mirror of
https://github.com/nginx/nginx.git
synced 2025-01-20 21:33:20 -06:00
Set SSL session context for "ssl_session_cache none".
This fixes a bug when client certficate is used and nginx closes connection with the message: "SSL_GET_PREV_SESSION:session id context uninitialized".
This commit is contained in:
parent
bd4b6e68af
commit
416fc7aac7
@ -1428,6 +1428,8 @@ ngx_ssl_session_cache(ngx_ssl_t *ssl, ngx_str_t *sess_ctx,
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
SSL_CTX_set_session_id_context(ssl->ctx, sess_ctx->data, sess_ctx->len);
|
||||
|
||||
if (builtin_session_cache == NGX_SSL_NONE_SCACHE) {
|
||||
|
||||
/*
|
||||
@ -1459,8 +1461,6 @@ ngx_ssl_session_cache(ngx_ssl_t *ssl, ngx_str_t *sess_ctx,
|
||||
|
||||
SSL_CTX_set_session_cache_mode(ssl->ctx, cache_mode);
|
||||
|
||||
SSL_CTX_set_session_id_context(ssl->ctx, sess_ctx->data, sess_ctx->len);
|
||||
|
||||
if (builtin_session_cache != NGX_SSL_NO_BUILTIN_SCACHE) {
|
||||
|
||||
if (builtin_session_cache != NGX_SSL_DFLT_BUILTIN_SCACHE) {
|
||||
|
Loading…
Reference in New Issue
Block a user