Mercurial > hg > nginx
changeset 6255:b40af2fd1c16
SSL: compatibility with OpenSSL master branch.
RAND_pseudo_bytes() is deprecated in the OpenSSL master branch, so the only
use was changed to RAND_bytes(). Access to internal structures is no longer
possible, so now we don't try to set SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS even
if it's defined.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 24 Sep 2015 17:19:08 +0300 |
parents | 74ec27cb67c1 |
children | 9dfc4ba140f9 |
files | src/event/ngx_event_openssl.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/event/ngx_event_openssl.c Thu Sep 24 17:18:42 2015 +0300 +++ b/src/event/ngx_event_openssl.c Thu Sep 24 17:19:08 2015 +0300 @@ -1158,6 +1158,7 @@ c->recv_chain = ngx_ssl_recv_chain; c->send_chain = ngx_ssl_send_chain; +#if OPENSSL_VERSION_NUMBER < 0x10100000L #ifdef SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS /* initial handshake done, disable renegotiation (CVE-2009-3555) */ @@ -1166,6 +1167,7 @@ } #endif +#endif return NGX_OK; } @@ -2861,7 +2863,7 @@ ngx_hex_dump(buf, key[0].name, 16) - buf, buf, SSL_session_reused(ssl_conn) ? "reused" : "new"); - RAND_pseudo_bytes(iv, 16); + RAND_bytes(iv, 16); EVP_EncryptInit_ex(ectx, EVP_aes_128_cbc(), NULL, key[0].aes_key, iv); HMAC_Init_ex(hctx, key[0].hmac_key, 16, ngx_ssl_session_ticket_md(), NULL);