curl/lib/vtls
Jay Satiro f7ba0eccf7 openssl: check if sessionid flag is enabled before retrieving session
Ideally, Curl_ssl_getsessionid should not be called unless sessionid
caching is enabled. There is a debug assertion in the function to help
ensure that. Therefore, the pattern in all vtls is basically:

  if(primary.sessionid) {lock(); Curl_ssl_getsessionid(...); unlock();}

There was one instance in openssl.c where sessionid was not checked
beforehand and this change fixes that.

Prior to this change an assertion would occur in openssl debug builds
during connection stage if session caching was disabled.

Reported-by: Jim Beveridge

Fixes https://github.com/curl/curl/issues/8472
Closes https://github.com/curl/curl/pull/8484
2022-02-21 03:23:47 -05:00
..
bearssl.c ssl: reduce allocated space for ssl backend when FTP is disabled 2022-02-21 08:39:55 +01:00
bearssl.h copyright: fix year ranges 2020-11-05 08:22:10 +01:00
gskit.c ssl: reduce allocated space for ssl backend when FTP is disabled 2022-02-21 08:39:55 +01:00
gskit.h copyright: fix year ranges 2020-11-05 08:22:10 +01:00
gtls.c ssl: reduce allocated space for ssl backend when FTP is disabled 2022-02-21 08:39:55 +01:00
gtls.h gtls: add gnutls include for the session type 2021-12-29 23:46:13 +01:00
hostcheck.c hostcheck: reduce strlen calls on chained certificates 2022-02-13 11:42:47 +01:00
hostcheck.h hostcheck: reduce strlen calls on chained certificates 2022-02-13 11:42:47 +01:00
keylog.c curl.se: new home 2020-11-04 23:59:47 +01:00
keylog.h curl.se: new home 2020-11-04 23:59:47 +01:00
mbedtls_threadlock.c misc: update incorrect copyright year ranges 2021-08-16 11:21:47 +02:00
mbedtls_threadlock.h curl.se: new home 2020-11-04 23:59:47 +01:00
mbedtls.c ssl: reduce allocated space for ssl backend when FTP is disabled 2022-02-21 08:39:55 +01:00
mbedtls.h copyright: fix year ranges 2020-11-05 08:22:10 +01:00
nss.c ssl: reduce allocated space for ssl backend when FTP is disabled 2022-02-21 08:39:55 +01:00
nssg.h copyright: fix year ranges 2020-11-05 08:22:10 +01:00
openssl.c openssl: check if sessionid flag is enabled before retrieving session 2022-02-21 03:23:47 -05:00
openssl.h openssl.h: avoid including OpenSSL headers here 2022-01-08 14:39:12 +01:00
rustls.c ssl: reduce allocated space for ssl backend when FTP is disabled 2022-02-21 08:39:55 +01:00
rustls.h copyright: update copyright year ranges to 2021 2021-03-27 23:00:14 +01:00
schannel_verify.c ssl: reduce allocated space for ssl backend when FTP is disabled 2022-02-21 08:39:55 +01:00
schannel.c ssl: reduce allocated space for ssl backend when FTP is disabled 2022-02-21 08:39:55 +01:00
schannel.h schannel: move the algIds array out of schannel.h 2022-02-18 08:03:22 +01:00
sectransp.c ssl: reduce allocated space for ssl backend when FTP is disabled 2022-02-21 08:39:55 +01:00
sectransp.h copyright: fix year ranges 2020-11-05 08:22:10 +01:00
vtls.c ssl: reduce allocated space for ssl backend when FTP is disabled 2022-02-21 08:39:55 +01:00
vtls.h vtls: pass on the right SNI name 2022-01-27 08:36:10 +01:00
wolfssl.c ssl: reduce allocated space for ssl backend when FTP is disabled 2022-02-21 08:39:55 +01:00
wolfssl.h copyright: fix year ranges 2020-11-05 08:22:10 +01:00
x509asn1.c hostcheck: reduce strlen calls on chained certificates 2022-02-13 11:42:47 +01:00
x509asn1.h x509asn1: toggle off functions not needed for diff tls backends 2022-02-05 00:11:34 +01:00