mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-10 22:33:07 -05:00
ITS#6248 fix prev commit tlso_ca_list
Don't quit on first dir failure, try them all before giving up.
This commit is contained in:
parent
dfcaa3f01e
commit
ff0defdc13
1 changed files with 6 additions and 7 deletions
|
|
@ -172,19 +172,18 @@ tlso_ca_list( char * bundle, char * dir, X509 *cert )
|
|||
}
|
||||
if ( dir ) {
|
||||
char **dirs = ldap_str2charray( dir, CERTPATHSEP );
|
||||
int freeit = 0, i;
|
||||
int freeit = 0, i, success = 0;
|
||||
|
||||
if ( !ca_list ) {
|
||||
ca_list = sk_X509_NAME_new_null();
|
||||
freeit = 1;
|
||||
}
|
||||
for ( i=0; dirs[i]; i++ ) {
|
||||
if ( !SSL_add_dir_cert_subjects_to_stack( ca_list, dir ) &&
|
||||
freeit ) {
|
||||
sk_X509_NAME_free( ca_list );
|
||||
ca_list = NULL;
|
||||
break;
|
||||
}
|
||||
success += SSL_add_dir_cert_subjects_to_stack( ca_list, dir );
|
||||
}
|
||||
if ( !success && freeit ) {
|
||||
sk_X509_NAME_free( ca_list );
|
||||
ca_list = NULL;
|
||||
}
|
||||
ldap_charray_free( dirs );
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue