diff options
author | jsing <> | 2022-01-11 19:03:15 +0000 |
---|---|---|
committer | jsing <> | 2022-01-11 19:03:15 +0000 |
commit | 29dd08f9d36c1e143430c23b6c134c873648b8f4 (patch) | |
tree | 41d4132a79c4a27fd233912019e3d7a523318b29 /src/lib/libssl/ssl_sess.c | |
parent | 1e518bcbf05a26f72d8671b296a6096f39cf402e (diff) | |
download | openbsd-29dd08f9d36c1e143430c23b6c134c873648b8f4.tar.gz openbsd-29dd08f9d36c1e143430c23b6c134c873648b8f4.tar.bz2 openbsd-29dd08f9d36c1e143430c23b6c134c873648b8f4.zip |
Remove peer_pkeys from SSL_SESSION.
peer_pkeys comes from some world where peers can send multiple certificates
- in fact, one of each known type. Since we do not live in such a world,
get rid of peer_pkeys and simply use peer_cert instead (in both TLSv1.2
and TLSv1.3, both clients and servers can only send a single leaf
(aka end-entity) certificate).
ok inoguchi@ tb@
Diffstat (limited to 'src/lib/libssl/ssl_sess.c')
-rw-r--r-- | src/lib/libssl/ssl_sess.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/lib/libssl/ssl_sess.c b/src/lib/libssl/ssl_sess.c index a49076be74..44c2e846ba 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.108 2022/01/11 18:39:28 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_sess.c,v 1.109 2022/01/11 19:03:15 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,8 +230,6 @@ 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 | |||
235 | ss->tlsext_ecpointformatlist_length = 0; | 233 | ss->tlsext_ecpointformatlist_length = 0; |
236 | ss->tlsext_ecpointformatlist = NULL; | 234 | ss->tlsext_ecpointformatlist = NULL; |
237 | ss->tlsext_supportedgroups_length = 0; | 235 | ss->tlsext_supportedgroups_length = 0; |
@@ -763,8 +761,6 @@ SSL_SESSION_free(SSL_SESSION *ss) | |||
763 | explicit_bzero(ss->session_id, sizeof ss->session_id); | 761 | explicit_bzero(ss->session_id, sizeof ss->session_id); |
764 | 762 | ||
765 | sk_X509_pop_free(ss->cert_chain, X509_free); | 763 | 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); | ||
768 | 764 | ||
769 | X509_free(ss->peer_cert); | 765 | X509_free(ss->peer_cert); |
770 | 766 | ||