summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509v3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/x509v3')
-rw-r--r--src/lib/libcrypto/x509v3/v3_purp.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/lib/libcrypto/x509v3/v3_purp.c b/src/lib/libcrypto/x509v3/v3_purp.c
index 69a8d05f26..a091a7f425 100644
--- a/src/lib/libcrypto/x509v3/v3_purp.c
+++ b/src/lib/libcrypto/x509v3/v3_purp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: v3_purp.c,v 1.26 2015/02/10 13:28:17 jsing Exp $ */ 1/* $OpenBSD: v3_purp.c,v 1.27 2016/11/08 20:01:06 miod 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 2001. 3 * project 2001.
4 */ 4 */
@@ -450,8 +450,14 @@ x509v3_cache_extensions(X509 *x)
450 x->ex_flags |= EXFLAG_INVALID; 450 x->ex_flags |= EXFLAG_INVALID;
451 } 451 }
452 if (pci->pcPathLengthConstraint) { 452 if (pci->pcPathLengthConstraint) {
453 x->ex_pcpathlen = 453 if (pci->pcPathLengthConstraint->type ==
454 ASN1_INTEGER_get(pci->pcPathLengthConstraint); 454 V_ASN1_NEG_INTEGER) {
455 x->ex_flags |= EXFLAG_INVALID;
456 x->ex_pcpathlen = 0;
457 } else
458 x->ex_pcpathlen =
459 ASN1_INTEGER_get(pci->
460 pcPathLengthConstraint);
455 } else 461 } else
456 x->ex_pcpathlen = -1; 462 x->ex_pcpathlen = -1;
457 PROXY_CERT_INFO_EXTENSION_free(pci); 463 PROXY_CERT_INFO_EXTENSION_free(pci);