diff options
author | jsing <> | 2022-01-08 12:59:59 +0000 |
---|---|---|
committer | jsing <> | 2022-01-08 12:59:59 +0000 |
commit | b30ca58d70d934bae7bf7e8653a6c20abbb32a31 (patch) | |
tree | a0f52599388e1e633ef501a33e33307964a97198 /src/lib/libssl/ssl_lib.c | |
parent | c9912e9c904debefddadcc409940eab31cf8b02b (diff) | |
download | openbsd-b30ca58d70d934bae7bf7e8653a6c20abbb32a31.tar.gz openbsd-b30ca58d70d934bae7bf7e8653a6c20abbb32a31.tar.bz2 openbsd-b30ca58d70d934bae7bf7e8653a6c20abbb32a31.zip |
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@
Diffstat (limited to '')
-rw-r--r-- | src/lib/libssl/ssl_lib.c | 16 |
1 files changed, 5 insertions, 11 deletions
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 @@ | |||
1 | /* $OpenBSD: ssl_lib.c,v 1.282 2022/01/08 12:43:44 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_lib.c,v 1.283 2022/01/08 12:59:58 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 | * |
@@ -883,20 +883,14 @@ SSL_get_peer_certificate(const SSL *s) | |||
883 | STACK_OF(X509) * | 883 | STACK_OF(X509) * |
884 | SSL_get_peer_cert_chain(const SSL *s) | 884 | SSL_get_peer_cert_chain(const SSL *s) |
885 | { | 885 | { |
886 | STACK_OF(X509) *r; | 886 | if (s == NULL || s->session == NULL) |
887 | 887 | return NULL; | |
888 | if ((s == NULL) || (s->session == NULL) || | ||
889 | (s->session->sess_cert == NULL)) | ||
890 | r = NULL; | ||
891 | else | ||
892 | r = s->session->sess_cert->cert_chain; | ||
893 | 888 | ||
894 | /* | 889 | /* |
895 | * If we are a client, cert_chain includes the peer's own | 890 | * If we are a client, cert_chain includes the peer's own |
896 | * certificate; | 891 | * certificate; if we are a server, it does not. |
897 | * if we are a server, it does not. | ||
898 | */ | 892 | */ |
899 | return (r); | 893 | return s->session->cert_chain; |
900 | } | 894 | } |
901 | 895 | ||
902 | STACK_OF(X509) * | 896 | STACK_OF(X509) * |