From: Dr. Stephen Henson Date: Tue, 6 Jan 2015 20:29:28 +0000 (-0500) Subject: RT3662: Allow leading . in nameConstraints X-Git-Tag: master-pre-reformat~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77ff1f3b8bfaa348956c5096a2b829f2e767b4f1;p=thirdparty%2Fopenssl.git RT3662: Allow leading . in nameConstraints Change by SteveH from original by John Denker (in the RT) Reviewed-by: Rich Salz --- diff --git a/crypto/x509v3/v3_ncons.c b/crypto/x509v3/v3_ncons.c index 06520fee411..25c18551493 100644 --- a/crypto/x509v3/v3_ncons.c +++ b/crypto/x509v3/v3_ncons.c @@ -405,7 +405,7 @@ static int nc_dns(ASN1_IA5STRING *dns, ASN1_IA5STRING *base) if (dns->length > base->length) { dnsptr += dns->length - base->length; - if (dnsptr[-1] != '.') + if (*baseptr != '.' && dnsptr[-1] != '.') return X509_V_ERR_PERMITTED_VIOLATION; }