]> granicus.if.org Git - php/commitdiff
Add ifdef on ecdh for single_ecdh_use
authorLior Kaplan <kaplanlior@gmail.com>
Tue, 15 Jul 2014 21:10:29 +0000 (00:10 +0300)
committerLior Kaplan <kaplanlior@gmail.com>
Tue, 15 Jul 2014 21:10:29 +0000 (00:10 +0300)
Allows build with OpenSSL < 0.9.8

ext/openssl/xp_ssl.c

index c6a91570cff420229d34be60c2c9d395e11c8e0c..948bb14ebeac0d7ccbe5064db65660ed43788d6f 100644 (file)
@@ -1164,12 +1164,14 @@ static int set_server_specific_opts(php_stream *stream, SSL_CTX *ctx TSRMLS_DC)
                ssl_ctx_options |= SSL_OP_SINGLE_DH_USE;
        }
 
+#ifdef HAVE_ECDH
        if (SUCCESS == php_stream_context_get_option(
                                stream->context, "ssl", "single_ecdh_use", &val) &&
                        zend_is_true(*val)
        ) {
                ssl_ctx_options |= SSL_OP_SINGLE_ECDH_USE;
        }
+#endif
 
        SSL_CTX_set_options(ctx, ssl_ctx_options);