2
0
mirror of https://github.com/xcat2/xNBA.git synced 2025-02-06 14:01:53 +00:00

Revert "Fix assertion failure on certs without subjectAltName"

This reverts commit e217322f39ae18f0a9976d8c23bb1661f9966d5f.
This commit is contained in:
Jarrod Johnson 2014-07-02 10:08:37 -04:00
parent e217322f39
commit d545f9e93f

View File

@ -2445,15 +2445,14 @@ static int tls_validator_name( struct tls_session *tls, struct x509_certificate
if ( ( cert->subject.name == NULL ) && ( !cert->extensions.subject_alt_name.present ) ) {
return -1;
}
if ( cert->extensions.subject_alt_name.present ) {
struct x509_san_link* link;
list_for_each_entry ( link, &cert->extensions.subject_alt_name.names, list ) {
/* If the name matches, return 0, otherwise, continue */
if ( dns_wildcard_matcher ( tls->name, link->name ) == 0) {
return 0;
}
struct x509_san_link* link;
list_for_each_entry ( link, &cert->extensions.subject_alt_name.names, list ) {
/* If the name matches, return 0, otherwise, continue */
if ( dns_wildcard_matcher ( tls->name, link->name ) == 0) {
return 0;
}
} else {
}
if ( !cert->extensions.subject_alt_name.present ) {
return dns_wildcard_matcher ( tls->name, cert->subject.name );
}
return -1;