diff --git a/ssl/ssl_lib.cc b/ssl/ssl_lib.cc index 0bf58a4fa..222a31621 100644 --- a/ssl/ssl_lib.cc +++ b/ssl/ssl_lib.cc @@ -585,16 +585,7 @@ static uint32_t ssl_session_hash(const SSL_SESSION *sess) { return hash; } -// NB: If this function (or indeed the hash function which uses a sort of -// coarser function than this one) is changed, ensure -// SSL_CTX_has_matching_session_id() is checked accordingly. It relies on being -// able to construct an SSL_SESSION that will collide with any existing session -// with a matching session ID. static int ssl_session_cmp(const SSL_SESSION *a, const SSL_SESSION *b) { - if (a->ssl_version != b->ssl_version) { - return 1; - } - if (a->session_id_length != b->session_id_length) { return 1; } diff --git a/ssl/ssl_session.cc b/ssl/ssl_session.cc index 1a098fbd9..adec8dc3e 100644 --- a/ssl/ssl_session.cc +++ b/ssl/ssl_session.cc @@ -670,7 +670,6 @@ static enum ssl_hs_wait_t ssl_lookup_session( if (!(ssl->session_ctx->session_cache_mode & SSL_SESS_CACHE_NO_INTERNAL_LOOKUP)) { SSL_SESSION data; - data.ssl_version = ssl->version; data.session_id_length = session_id_len; OPENSSL_memcpy(data.session_id, session_id, session_id_len); diff --git a/ssl/test/runner/runner.go b/ssl/test/runner/runner.go index d9e4d3690..53f6ac8c9 100644 --- a/ssl/test/runner/runner.go +++ b/ssl/test/runner/runner.go @@ -7609,6 +7609,27 @@ func addResumptionVersionTests() { "-on-resume-tls13-variant", strconv.Itoa(resumeVers.tls13Variant), }, }) + + // Repeat the test using session IDs, rather than tickets. + if sessionVers.version < VersionTLS13 && resumeVers.version < VersionTLS13 { + testCases = append(testCases, testCase{ + protocol: protocol, + testType: serverTest, + name: "Resume-Server-NoTickets" + suffix, + resumeSession: true, + config: Config{ + MaxVersion: sessionVers.version, + SessionTicketsDisabled: true, + }, + expectedVersion: sessionVers.version, + expectResumeRejected: sessionVers != resumeVers, + resumeConfig: &Config{ + MaxVersion: resumeVers.version, + SessionTicketsDisabled: true, + }, + expectedResumeVersion: resumeVers.version, + }) + } } } }