Skip to content

Commit

Permalink
Disable OpenSSL session caching if OpenSSL version < 1.0.0b.
Browse files Browse the repository at this point in the history
(Closes RADSECPROXY-14.)
  • Loading branch information
Linus Nordberg committed Nov 17, 2010
1 parent 7deb518 commit f0db61d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tlscommon.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,13 @@ static SSL_CTX *tlscreatectx(uint8_t type, struct tls *conf) {
debug(DBG_ERR, "tlscreatectx: Error initialising SSL/TLS in TLS context %s", conf->name);
return NULL;
}
#if OPENSSL_VERSION_NUMBER < 0x1000002f
debug(DBG_WARN, "%s: OpenSSL seems to be older than "
"1.0.0b -- disabling OpenSSL session caching for context %p "
"to avoid a TLS extension parsing race condition "
"(http://openssl.org/news/secadv_20101116.txt).", __func__, ctx);
SSL_CTX_set_session_cache_mode(ctx, SSL_SESS_CACHE_OFF);
#endif

if (conf->certkeypwd) {
SSL_CTX_set_default_passwd_cb_userdata(ctx, conf->certkeypwd);
Expand Down

0 comments on commit f0db61d

Please sign in to comment.