summaryrefslogtreecommitdiffstats
path: root/ssl/ssl_cert.c
diff options
context:
space:
mode:
authorTodd Short <tshort@akamai.com>2018-12-12 13:09:50 -0500
committerMatt Caswell <matt@openssl.org>2019-04-29 17:26:09 +0100
commit555cbb328ee2eaa9356cd23e2194c1600653c500 (patch)
tree347c1fcdde0e9a736eb6c8590d95318b4c1940f6 /ssl/ssl_cert.c
parentd7fcf1feac3b3b1bf1a162f632b1e7db4f075aed (diff)
Collapse ssl3_state_st (s3) into ssl_st
With the removal of SSLv2, the s3 structure is always allocated, so there is little point in having it be an allocated pointer. Collapse the ssl3_state_st structure into ssl_st and fixup any references. This should be faster than going through an indirection and due to fewer allocations, but I'm not seeing any significant performance improvement; it seems to be within the margin of error in timing. Reviewed-by: Paul Yang <yang.yang@baishancloud.com> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7888)
Diffstat (limited to 'ssl/ssl_cert.c')
-rw-r--r--ssl/ssl_cert.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ssl/ssl_cert.c b/ssl/ssl_cert.c
index 0d1d6dacc3..04963f1b73 100644
--- a/ssl/ssl_cert.c
+++ b/ssl/ssl_cert.c
@@ -516,13 +516,13 @@ void SSL_set_client_CA_list(SSL *s, STACK_OF(X509_NAME) *name_list)
const STACK_OF(X509_NAME) *SSL_get0_peer_CA_list(const SSL *s)
{
- return s->s3 != NULL ? s->s3->tmp.peer_ca_names : NULL;
+ return s->s3.tmp.peer_ca_names;
}
STACK_OF(X509_NAME) *SSL_get_client_CA_list(const SSL *s)
{
if (!s->server)
- return s->s3 != NULL ? s->s3->tmp.peer_ca_names : NULL;
+ return s->s3.tmp.peer_ca_names;
return s->client_ca_names != NULL ? s->client_ca_names
: s->ctx->client_ca_names;
}