From: Howard Chu Date: Sun, 9 Apr 2017 14:39:13 +0000 (+0100) Subject: Fixup cacert option X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2e011eeb6798b5b2743eda63a5023350d36efcdd;p=openldap Fixup cacert option --- diff --git a/libraries/libldap/tls_o.c b/libraries/libldap/tls_o.c index ce0663b66b..c280ace807 100644 --- a/libraries/libldap/tls_o.c +++ b/libraries/libldap/tls_o.c @@ -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;