]> git.kaiwu.me - nginx.git/commitdiff
SSL: fixed build with OPENSSL_NO_DEPRECATED defined.
authorMaxim Dounin <mdounin@mdounin.ru>
Wed, 9 Jul 2014 00:08:13 +0000 (04:08 +0400)
committerMaxim Dounin <mdounin@mdounin.ru>
Wed, 9 Jul 2014 00:08:13 +0000 (04:08 +0400)
The RSA_generate_key() is marked as deprecated and causes build to
fail.  On the other hand, replacement function, RSA_generate_key_ex(),
requires much more code.  Since RSA_generate_key() is only needed
for barely usable EXP ciphers, the #ifdef was added instead.

Prodded by Piotr Sikora.

src/event/ngx_event_openssl.c

index 46934b2f6007937428066919acacaa0a07294dcb..a5278cb5daa087a66c67264f27cb2ebe9c15702c 100644 (file)
@@ -656,10 +656,14 @@ ngx_ssl_rsa512_key_callback(ngx_ssl_conn_t *ssl_conn, int is_export,
         return NULL;
     }
 
+#ifndef OPENSSL_NO_DEPRECATED
+
     if (key == NULL) {
         key = RSA_generate_key(512, RSA_F4, NULL, NULL);
     }
 
+#endif
+
     return key;
 }