openssl/ssl
Matt Caswell e70656cf1c Ensure SSL_set_session clears the old session from cache if it is bad
SSL_clear() and SSL_free() will remove a session from the cache if it is
considered "bad". However SSL_set_session() does not do this for the session
it is replacing.

SSL_clear() clears an SSL object ready for reuse. It does not clear the
session though. This means that:

  SSL_clear(s)
  SSL_set_session(s, sess);

and
  SSL_set_session(s, sess);
  SSL_clear(s);

do not do the same thing, although logically you would expect that they
would.

The failure of SSL_set_session() to remove bad sessions from the cache
should be considered a bug, so this commit fixes it.

RT#597

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-06-13 17:35:18 +01:00
..
record Always use session_ctx when removing a session 2016-06-08 15:22:41 +01:00
statem RT3720 Increment session miss counter properly 2016-06-09 23:34:18 +01:00
bio_ssl.c Copyright consolidation 01/10 2016-05-17 14:19:19 -04:00
build.info
d1_lib.c Copyright consolidation 01/10 2016-05-17 14:19:19 -04:00
d1_msg.c Copyright consolidation 01/10 2016-05-17 14:19:19 -04:00
d1_srtp.c Copyright consolidation 01/10 2016-05-17 14:19:19 -04:00
methods.c Copyright consolidation 01/10 2016-05-17 14:19:19 -04:00
packet_locl.h Copyright consolidation 01/10 2016-05-17 14:19:19 -04:00
pqueue.c Copyright consolidation 01/10 2016-05-17 14:19:19 -04:00
s3_cbc.c Copyright consolidation 01/10 2016-05-17 14:19:19 -04:00
s3_enc.c Handle a memory allocation failure in ssl3_init_finished_mac() 2016-06-03 20:29:04 +01:00
s3_lib.c Add SSL_CTX_get_tlsext_status_type() 2016-06-07 17:05:52 +01:00
s3_msg.c Always use session_ctx when removing a session 2016-06-08 15:22:41 +01:00
ssl_asn1.c Copyright consolidation 01/10 2016-05-17 14:19:19 -04:00
ssl_cert.c Fix ssl_cert_set0_chain invalid pointer 2016-05-27 17:20:10 +01:00
ssl_ciph.c Copyright consolidation 01/10 2016-05-17 14:19:19 -04:00
ssl_conf.c Copyright consolidation 01/10 2016-05-17 14:19:19 -04:00
ssl_err.c RT3895: Remove fprintf's from SSL library. 2016-06-04 07:08:29 -04:00
ssl_init.c Copyright consolidation 01/10 2016-05-17 14:19:19 -04:00
ssl_lib.c Don't compare a just free()d pointer 2016-06-11 16:43:49 +02:00
ssl_locl.h Handle a memory allocation failure in ssl3_init_finished_mac() 2016-06-03 20:29:04 +01:00
ssl_mcnf.c Copyright consolidation 01/10 2016-05-17 14:19:19 -04:00
ssl_rsa.c Copyright consolidation 01/10 2016-05-17 14:19:19 -04:00
ssl_sess.c Ensure SSL_set_session clears the old session from cache if it is bad 2016-06-13 17:35:18 +01:00
ssl_stat.c Copyright consolidation 01/10 2016-05-17 14:19:19 -04:00
ssl_txt.c Copyright consolidation 01/10 2016-05-17 14:19:19 -04:00
ssl_utst.c Copyright consolidation 01/10 2016-05-17 14:19:19 -04:00
t1_enc.c Copyright consolidation 01/10 2016-05-17 14:19:19 -04:00
t1_ext.c Copyright consolidation 01/10 2016-05-17 14:19:19 -04:00
t1_lib.c Fix session ticket and SNI 2016-06-09 13:07:51 -04:00
t1_reneg.c Copyright consolidation 01/10 2016-05-17 14:19:19 -04:00
t1_trce.c Copyright consolidation 01/10 2016-05-17 14:19:19 -04:00
tls_srp.c Copyright consolidation 01/10 2016-05-17 14:19:19 -04:00