mirror of
https://github.com/openssl/openssl.git
synced 2024-12-05 07:54:47 +08:00
Don't lookup zero length session ID.
PR: 1591
This commit is contained in:
parent
4017e8706c
commit
3d3bf9c730
@ -435,10 +435,12 @@ int ssl_get_prev_session(SSL *s, unsigned char *session_id, int len,
|
||||
fatal = 1;
|
||||
goto err;
|
||||
}
|
||||
else if (r == 0)
|
||||
else if (r == 0 || (!ret || !len))
|
||||
goto err;
|
||||
else if (!ret && !(s->session_ctx->session_cache_mode & SSL_SESS_CACHE_NO_INTERNAL_LOOKUP))
|
||||
#else
|
||||
if (len == 0)
|
||||
goto err;
|
||||
if (!(s->session_ctx->session_cache_mode & SSL_SESS_CACHE_NO_INTERNAL_LOOKUP))
|
||||
#endif
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user