diff options
author | 2020-01-21 04:45:18 +0000 | |
---|---|---|
committer | 2020-01-21 04:45:18 +0000 | |
commit | 070fefd49d42f313a21115021854663912e5c7da (patch) | |
tree | 9356c96d73aeb85ad206aec9a69088654143621b /lib/libssl/ssl_lib.c | |
parent | Add alert processing in tls client code, by adding alert to the (diff) | |
download | wireguard-openbsd-070fefd49d42f313a21115021854663912e5c7da.tar.xz wireguard-openbsd-070fefd49d42f313a21115021854663912e5c7da.zip |
Clear and free the tls13_ctx that hangs off an SSL *s from
SSL_{clear,free}(3). Make sure the handshake context is
cleaned up completely: the hs_tls13 reacharound is taken
care of by ssl3_{clear,free}(3). Add a missing
tls13_handshake_msg_free() call to tls13_ctx_free().
ok beck jsing
Diffstat (limited to 'lib/libssl/ssl_lib.c')
-rw-r--r-- | lib/libssl/ssl_lib.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/libssl/ssl_lib.c b/lib/libssl/ssl_lib.c index 374342c3113..a667b5d2945 100644 --- a/lib/libssl/ssl_lib.c +++ b/lib/libssl/ssl_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_lib.c,v 1.207 2019/11/17 19:07:07 jsing Exp $ */ +/* $OpenBSD: ssl_lib.c,v 1.208 2020/01/21 04:45:18 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -193,6 +193,9 @@ SSL_clear(SSL *s) s->internal->rwstate = SSL_NOTHING; s->internal->rstate = SSL_ST_READ_HEADER; + tls13_ctx_free(s->internal->tls13); + s->internal->tls13 = NULL; + BUF_MEM_free(s->internal->init_buf); s->internal->init_buf = NULL; @@ -524,6 +527,8 @@ SSL_free(SSL *s) BIO_free_all(s->rbio); BIO_free_all(s->wbio); + tls13_ctx_free(s->internal->tls13); + BUF_MEM_free(s->internal->init_buf); /* add extra stuff */ |