From b30ca58d70d934bae7bf7e8653a6c20abbb32a31 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Sat, 8 Jan 2022 12:59:59 +0000 Subject: Merge SESS_CERT into SSL_SESSION. There is no reason for SESS_CERT to exist - remove it and merge its members into SSL_SESSION for the time being. More clean up to follow. ok inoguchi@ tb@ --- src/lib/libssl/ssl_lib.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'src/lib/libssl/ssl_lib.c') diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index 64b1806238..fb0920cdf2 100644 --- a/src/lib/libssl/ssl_lib.c +++ b/src/lib/libssl/ssl_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_lib.c,v 1.282 2022/01/08 12:43:44 jsing Exp $ */ +/* $OpenBSD: ssl_lib.c,v 1.283 2022/01/08 12:59:58 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -883,20 +883,14 @@ SSL_get_peer_certificate(const SSL *s) STACK_OF(X509) * SSL_get_peer_cert_chain(const SSL *s) { - STACK_OF(X509) *r; - - if ((s == NULL) || (s->session == NULL) || - (s->session->sess_cert == NULL)) - r = NULL; - else - r = s->session->sess_cert->cert_chain; + if (s == NULL || s->session == NULL) + return NULL; /* * If we are a client, cert_chain includes the peer's own - * certificate; - * if we are a server, it does not. + * certificate; if we are a server, it does not. */ - return (r); + return s->session->cert_chain; } STACK_OF(X509) * -- cgit v1.2.3-55-g6feb