summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authortedu <>2017-07-20 19:45:08 +0000
committertedu <>2017-07-20 19:45:08 +0000
commitf6b2dbc635dc388fe53d3df21e4a43cb4b51ad91 (patch)
treeb17c23b5fee99229a24ac05a9aa97e6c644fe667 /src/lib
parentf174662974388d37d30639304fdd547f72608404 (diff)
downloadopenbsd-f6b2dbc635dc388fe53d3df21e4a43cb4b51ad91.tar.gz
openbsd-f6b2dbc635dc388fe53d3df21e4a43cb4b51ad91.tar.bz2
openbsd-f6b2dbc635dc388fe53d3df21e4a43cb4b51ad91.zip
Allow leading . in nameConstraints. from openssl via jabberwock. ok jsing
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/x509v3/v3_ncons.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/x509v3/v3_ncons.c b/src/lib/libcrypto/x509v3/v3_ncons.c
index d22ca5e9cd..4913135cf9 100644
--- a/src/lib/libcrypto/x509v3/v3_ncons.c
+++ b/src/lib/libcrypto/x509v3/v3_ncons.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: v3_ncons.c,v 1.12 2017/05/02 04:11:08 deraadt Exp $ */ 1/* $OpenBSD: v3_ncons.c,v 1.13 2017/07/20 19:45:08 tedu Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project. 3 * project.
4 */ 4 */
@@ -457,7 +457,7 @@ nc_dns(ASN1_IA5STRING *dns, ASN1_IA5STRING *base)
457 */ 457 */
458 if (dns->length > base->length) { 458 if (dns->length > base->length) {
459 dnsptr += dns->length - base->length; 459 dnsptr += dns->length - base->length;
460 if (dnsptr[-1] != '.') 460 if (baseptr[0] != '.' && dnsptr[-1] != '.')
461 return X509_V_ERR_PERMITTED_VIOLATION; 461 return X509_V_ERR_PERMITTED_VIOLATION;
462 } 462 }
463 463