A few SSL-related fixes