summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjob <>2023-04-23 21:46:07 +0000
committerjob <>2023-04-23 21:46:07 +0000
commit1d45dfeb373f7994856604f468f3106e8b772122 (patch)
tree1677b9a80e835853700268f3fcd55acbabcf1162
parent6890c17c165600353035d2ed857ba0e7c4005d42 (diff)
downloadopenbsd-1d45dfeb373f7994856604f468f3106e8b772122.tar.gz
openbsd-1d45dfeb373f7994856604f468f3106e8b772122.tar.bz2
openbsd-1d45dfeb373f7994856604f468f3106e8b772122.zip
In the case of V1 certs, the extension count should be exactly 0
OK tb@
-rw-r--r--src/lib/libcrypto/x509/x509_purp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/x509/x509_purp.c b/src/lib/libcrypto/x509/x509_purp.c
index e0069313b9..610a6d8796 100644
--- a/src/lib/libcrypto/x509/x509_purp.c
+++ b/src/lib/libcrypto/x509/x509_purp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_purp.c,v 1.23 2023/04/23 21:39:19 job Exp $ */ 1/* $OpenBSD: x509_purp.c,v 1.24 2023/04/23 21:46:07 job 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 */
@@ -459,7 +459,7 @@ x509v3_cache_extensions_internal(X509 *x)
459 /* V1 should mean no extensions ... */ 459 /* V1 should mean no extensions ... */
460 if (X509_get_version(x) == 0) { 460 if (X509_get_version(x) == 0) {
461 x->ex_flags |= EXFLAG_V1; 461 x->ex_flags |= EXFLAG_V1;
462 if (X509_get_ext_count(x) > 0) 462 if (X509v3_get_ext_count(x) != 0)
463 x->ex_flags |= EXFLAG_INVALID; 463 x->ex_flags |= EXFLAG_INVALID;
464 } 464 }
465 465