mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 01:12:40 +08:00
SSL: fixed build with OPENSSL_NO_DEPRECATED defined.
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.
This commit is contained in:
parent
bd058b9d24
commit
ce64398751
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user