mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 17:52:38 +08:00
SSL: use of SSL_MODE_NO_AUTO_CHAIN.
The SSL_MODE_NO_AUTO_CHAIN mode prevents OpenSSL from automatically building a certificate chain on the fly if there is no certificate chain explicitly provided. Before this change, certificates provided via the ssl_client_certificate and ssl_trusted_certificate directives were used by OpenSSL to automatically build certificate chains, resulting in unexpected (and in some cases unneeded) chains being sent to clients.
This commit is contained in:
parent
a20c6d202e
commit
47c44355b5
@ -285,6 +285,10 @@ ngx_ssl_create(ngx_ssl_t *ssl, ngx_uint_t protocols, void *data)
|
|||||||
SSL_CTX_set_mode(ssl->ctx, SSL_MODE_RELEASE_BUFFERS);
|
SSL_CTX_set_mode(ssl->ctx, SSL_MODE_RELEASE_BUFFERS);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef SSL_MODE_NO_AUTO_CHAIN
|
||||||
|
SSL_CTX_set_mode(ssl->ctx, SSL_MODE_NO_AUTO_CHAIN);
|
||||||
|
#endif
|
||||||
|
|
||||||
SSL_CTX_set_read_ahead(ssl->ctx, 1);
|
SSL_CTX_set_read_ahead(ssl->ctx, 1);
|
||||||
|
|
||||||
SSL_CTX_set_info_callback(ssl->ctx, ngx_ssl_info_callback);
|
SSL_CTX_set_info_callback(ssl->ctx, ngx_ssl_info_callback);
|
||||||
|
Loading…
Reference in New Issue
Block a user