- We must test the result of SSL_CTX_new() ( and exit if there is an error)
BEFORE to do the SSL_CTX_set_options
#endif
+ if (!ctx->openssl) {
+ openssl_post_errors(M_FATAL, _("Error initializing SSL context"));
+ goto err;
+ }
+
/* Use SSL_OP_ALL to turn on all "rather harmless" workarounds that
* OpenSSL offers
*/
/* Now disable old broken SSLv3 and SSLv2 protocols */
SSL_CTX_set_options(ctx->openssl, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3);
- if (!ctx->openssl) {
- openssl_post_errors(M_FATAL, _("Error initializing SSL context"));
- goto err;
- }
-
/* Set up pem encryption callback */
if (pem_callback) {
ctx->pem_callback = pem_callback;