diff options
author | Watson Ladd <watsonbladd@gmail.com> | 2023-04-27 19:14:51 +0200 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2023-05-12 10:23:29 +0200 |
commit | 9fdf9a44bbe3827fe653165a07281ccae8ab0947 (patch) | |
tree | b9c799dab66fd1e1098ed5e6c55c5eb461883985 /test | |
parent | ecp_nistp256.c: Fix exponent in comment (diff) | |
download | openssl-9fdf9a44bbe3827fe653165a07281ccae8ab0947.tar.xz openssl-9fdf9a44bbe3827fe653165a07281ccae8ab0947.zip |
Clear ownership when duplicating sessions
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Todd Short <todd.short@me.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20848)
Diffstat (limited to 'test')
-rw-r--r-- | test/sslapitest.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/sslapitest.c b/test/sslapitest.c index eb5b5a5476..be1d742021 100644 --- a/test/sslapitest.c +++ b/test/sslapitest.c @@ -2285,7 +2285,9 @@ static int execute_test_session(int maxprot, int use_int_cache, */ if (use_int_cache && maxprot != TLS1_3_VERSION) { if (!TEST_ptr(tmp = SSL_SESSION_dup(sess2)) - || !TEST_true(SSL_CTX_remove_session(sctx, sess2))) + || !TEST_true(sess2->owner != NULL) + || !TEST_true(tmp->owner == NULL) + || !TEST_true(SSL_CTX_remove_session(sctx, sess2))) goto end; SSL_SESSION_free(sess2); } |