Don't use client specific functions to retrieve CA list
authorDr. Stephen Henson <steve@openssl.org>
Mon, 20 Mar 2017 18:33:54 +0000 (18:33 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Mon, 3 Apr 2017 22:47:21 +0000 (23:47 +0100)
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3015)

ssl/statem/extensions.c
ssl/statem/statem_lib.c

index 22669dd..96c5394 100644 (file)
@@ -992,7 +992,7 @@ static int tls_construct_certificate_authorities(SSL *s, WPACKET *pkt,
                                                  unsigned int context, X509 *x,
                                                  size_t chainidx, int *al)
 {
-    STACK_OF(X509_NAME) *ca_sk = SSL_get_client_CA_list(s);
+    const STACK_OF(X509_NAME) *ca_sk = SSL_get0_CA_list(s);
 
     if (ca_sk == NULL || sk_X509_NAME_num(ca_sk) == 0)
         return 1;
index e3fc7e8..f292b82 100644 (file)
@@ -2038,7 +2038,7 @@ int parse_ca_names(SSL *s, PACKET *pkt, int *al)
 
 int construct_ca_names(SSL *s, WPACKET *pkt)
 {
-    STACK_OF(X509_NAME) *ca_sk = SSL_get_client_CA_list(s);
+    const STACK_OF(X509_NAME) *ca_sk = SSL_get0_CA_list(s);
 
     /* Start sub-packet for client CA list */
     if (!WPACKET_start_sub_packet_u16(pkt))