Ver código fonte

disable completely SSL_CTX_set_ecdh_auto if No dynamic loading

As far as I know SSL_CTX_set_ecdh_auto:
* doesn't exist in debian 8 (1.0.1t)
* doesn't exist in ubuntu 12.04 (1.0.1)
* doesn't exist in ubuntu 14.04 (1.0.1f)
* does nothing in debian sid (1.1)
kakwa 8 anos atrás
pai
commit
e849ce4b54
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      src/civetweb.c

+ 2 - 2
src/civetweb.c

@@ -12312,9 +12312,9 @@ set_ssl_option(struct mg_context *ctx)
 	SSL_CTX_set_options(ctx->ssl_ctx, ssl_get_protocol(protocol_ver));
 	SSL_CTX_set_options(ctx->ssl_ctx, ssl_get_protocol(protocol_ver));
 	SSL_CTX_set_options(ctx->ssl_ctx, SSL_OP_SINGLE_DH_USE);
 	SSL_CTX_set_options(ctx->ssl_ctx, SSL_OP_SINGLE_DH_USE);
 	SSL_CTX_set_options(ctx->ssl_ctx, SSL_OP_CIPHER_SERVER_PREFERENCE);
 	SSL_CTX_set_options(ctx->ssl_ctx, SSL_OP_CIPHER_SERVER_PREFERENCE);
-#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x1000114fL
+#if !defined(NO_SSL_DL)
 	SSL_CTX_set_ecdh_auto(ctx->ssl_ctx, 1);
 	SSL_CTX_set_ecdh_auto(ctx->ssl_ctx, 1);
-#endif
+#endif /* NO_SSL_DL */
 
 
 	/* If a callback has been specified, call it. */
 	/* If a callback has been specified, call it. */
 	callback_ret =
 	callback_ret =