diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2020-01-21 04:45:19 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2020-01-21 04:45:19 +0000 |
commit | 7ba7b897607f6558c3ebc8ff74bb71515100fcd5 (patch) | |
tree | e8e68bf6def7a89bfb60d4732769c45514bb413e /lib/libssl/ssl_lib.c | |
parent | a8bf765e46df28451faf215c13e75a46c6c54fe0 (diff) |
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 */ |