summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_sess.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/ssl_sess.c')
-rw-r--r--src/lib/libssl/ssl_sess.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/libssl/ssl_sess.c b/src/lib/libssl/ssl_sess.c
index 2fa6af4564..8d0f0b928c 100644
--- a/src/lib/libssl/ssl_sess.c
+++ b/src/lib/libssl/ssl_sess.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_sess.c,v 1.106 2021/10/25 10:01:46 jsing Exp $ */ 1/* $OpenBSD: ssl_sess.c,v 1.107 2022/01/08 12:59:59 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -230,6 +230,8 @@ SSL_SESSION_new(void)
230 ss->next = NULL; 230 ss->next = NULL;
231 ss->tlsext_hostname = NULL; 231 ss->tlsext_hostname = NULL;
232 232
233 ss->peer_key = &ss->peer_pkeys[SSL_PKEY_RSA];
234
233 ss->tlsext_ecpointformatlist_length = 0; 235 ss->tlsext_ecpointformatlist_length = 0;
234 ss->tlsext_ecpointformatlist = NULL; 236 ss->tlsext_ecpointformatlist = NULL;
235 ss->tlsext_supportedgroups_length = 0; 237 ss->tlsext_supportedgroups_length = 0;
@@ -760,7 +762,9 @@ SSL_SESSION_free(SSL_SESSION *ss)
760 explicit_bzero(ss->master_key, sizeof ss->master_key); 762 explicit_bzero(ss->master_key, sizeof ss->master_key);
761 explicit_bzero(ss->session_id, sizeof ss->session_id); 763 explicit_bzero(ss->session_id, sizeof ss->session_id);
762 764
763 ssl_sess_cert_free(ss->sess_cert); 765 sk_X509_pop_free(ss->cert_chain, X509_free);
766 for (i = 0; i < SSL_PKEY_NUM; i++)
767 X509_free(ss->peer_pkeys[i].x509);
764 768
765 X509_free(ss->peer); 769 X509_free(ss->peer);
766 770