ITS#7746 fix for cert with NULL issuerDN

This commit is contained in:
Howard Chu 2013-11-14 03:02:07 -08:00
parent 01f4aeac4c
commit 5328340d35

View File

@ -3713,12 +3713,14 @@ certificateExactNormalize(
tag = ber_skip_tag( ber, &len ); /* SignatureAlg */ tag = ber_skip_tag( ber, &len ); /* SignatureAlg */
ber_skip_data( ber, len ); ber_skip_data( ber, len );
tag = ber_peek_tag( ber, &len ); /* IssuerDN */ tag = ber_peek_tag( ber, &len ); /* IssuerDN */
len = ber_ptrlen( ber ); if ( len ) {
bvdn.bv_val = val->bv_val + len; len = ber_ptrlen( ber );
bvdn.bv_len = val->bv_len - len; bvdn.bv_val = val->bv_val + len;
bvdn.bv_len = val->bv_len - len;
rc = dnX509normalize( &bvdn, &issuer_dn ); rc = dnX509normalize( &bvdn, &issuer_dn );
if ( rc != LDAP_SUCCESS ) goto done; if ( rc != LDAP_SUCCESS ) goto done;
}
normalized->bv_len = STRLENOF( "{ serialNumber , issuer rdnSequence:\"\" }" ) normalized->bv_len = STRLENOF( "{ serialNumber , issuer rdnSequence:\"\" }" )
+ sn2.bv_len + issuer_dn.bv_len; + sn2.bv_len + issuer_dn.bv_len;