diff --git a/CHANGES b/CHANGES index 635262aff6..e29a9a5efd 100644 --- a/CHANGES +++ b/CHANGES @@ -4,6 +4,13 @@ Changes between 0.9.6g and 0.9.6h [xx XXX xxxx] + *) Bugfix: client side session caching did not work with external caching, + because the session->cipher setting was not restored when reloading + from the external cache. This problem was masked, when + SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG (part of SSL_OP_ALL) was set. + (Found by Steve Haslam .) + [Lutz Jaenicke] + *) Fix client_certificate (ssl/s2_clnt.c): The permissible total length of the REQUEST-CERTIFICATE message is 18 .. 34, not 17 .. 33. [Zeev Lieber ] diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c index 22a0b097ac..727fae88f1 100644 --- a/ssl/s3_clnt.c +++ b/ssl/s3_clnt.c @@ -695,6 +695,11 @@ static int ssl3_get_server_hello(SSL *s) goto f_err; } + /* Depending on the session caching (internal/external), the cipher + and/or cipher_id values may not be set. Make sure that + cipher_id is set and use it for comparison. */ + if (s->session->cipher) + s->session->cipher_id = s->session->cipher->id; if (s->hit && (s->session->cipher_id != c->id)) { if (!(s->options &