]> granicus.if.org Git - apache/commitdiff
Follow-up to r1825120:
authorJoe Orton <jorton@apache.org>
Fri, 23 Feb 2018 12:10:49 +0000 (12:10 +0000)
committerJoe Orton <jorton@apache.org>
Fri, 23 Feb 2018 12:10:49 +0000 (12:10 +0000)
* modules/ssl/ssl_engine_init.c (ssl_init_ca_cert_path): Since
  SSL_add_file_cert_subjects_to_stack() internally replaces the
  comparison callback with one equivalent to
  ssl_init_FindCAList_X509NameCmp, there's no point in using that
  here.
  (ssl_init_FindCAList_X509NameCmp): Removed.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1825124 13f79535-47bb-0310-9956-ffa450edef68

modules/ssl/ssl_engine_init.c

index 8480ec3dc6a08527e5b12754fad8ec69e6846950..05432b5f71994cc928798fc7279acc2c5fc22403 100644 (file)
@@ -2010,12 +2010,6 @@ int ssl_proxy_section_post_config(apr_pool_t *p, apr_pool_t *plog,
     return OK;
 }
 
-static int ssl_init_FindCAList_X509NameCmp(const X509_NAME * const *a,
-                                           const X509_NAME * const *b)
-{
-    return(X509_NAME_cmp(*a, *b));
-}
-
 static apr_status_t ssl_init_ca_cert_path(server_rec *s,
                                           apr_pool_t *ptemp,
                                           const char *path,
@@ -2055,13 +2049,7 @@ STACK_OF(X509_NAME) *ssl_init_FindCAList(server_rec *s,
                                          const char *ca_file,
                                          const char *ca_path)
 {
-    STACK_OF(X509_NAME) *ca_list;
-
-    /*
-     * Start with a empty stack/list where new
-     * entries get added in sorted order.
-     */
-    ca_list = sk_X509_NAME_new(ssl_init_FindCAList_X509NameCmp);
+    STACK_OF(X509_NAME) *ca_list = sk_X509_NAME_new_null();;
 
     /*
      * Process CA certificate bundle file
@@ -2091,11 +2079,6 @@ STACK_OF(X509_NAME) *ssl_init_FindCAList(server_rec *s,
         return NULL;
     }
 
-    /*
-     * Cleanup
-     */
-    (void) sk_X509_NAME_set_cmp_func(ca_list, NULL);
-
     return ca_list;
 }