Remove obsolete version test when returning CA names.
authorDr. Stephen Henson <steve@openssl.org>
Thu, 16 Mar 2017 15:28:07 +0000 (15:28 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Thu, 16 Mar 2017 18:07:19 +0000 (18:07 +0000)
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2969)

ssl/ssl_cert.c

index 70aa69756419675ccdb74135c6bcbaba11d9f3c0..50b2e645a938001ff4db18310765ec01ff33b1b4 100644 (file)
@@ -506,15 +506,15 @@ STACK_OF(X509_NAME) *SSL_CTX_get_client_CA_list(const SSL_CTX *ctx)
 STACK_OF(X509_NAME) *SSL_get_client_CA_list(const SSL *s)
 {
     if (!s->server) {           /* we are in the client */
-        if (((s->version >> 8) == SSL3_VERSION_MAJOR) && (s->s3 != NULL))
-            return (s->s3->tmp.ca_names);
+        if (s->s3 != NULL)
+            return s->s3->tmp.ca_names;
         else
-            return (NULL);
+            return NULL;
     } else {
         if (s->client_CA != NULL)
-            return (s->client_CA);
+            return s->client_CA;
         else
-            return (s->ctx->client_CA);
+            return s->ctx->client_CA;
     }
 }