]> git.sur5r.net Git - openldap/commitdiff
Fixup cacert option
authorHoward Chu <hyc@openldap.org>
Sun, 9 Apr 2017 14:39:13 +0000 (15:39 +0100)
committerHoward Chu <hyc@openldap.org>
Sun, 9 Apr 2017 14:39:13 +0000 (15:39 +0100)
libraries/libldap/tls_o.c

index ce0663b66bc83a34788451d689a5220a8c558a03..c280ace8075c11c5b174249d99e81595a92146a0 100644 (file)
@@ -139,7 +139,9 @@ tlso_ca_list( char * bundle, char * dir, X509 *cert )
        if ( cert ) {
                X509_NAME *xn = X509_get_subject_name( cert );
                xn = X509_NAME_dup( xn );
-               if ( xn )
+               if ( !ca_list )
+                       ca_list = sk_X509_NAME_new_null();
+               if ( xn && ca_list )
                        sk_X509_NAME_push( ca_list, xn );
        }
        return ca_list;