summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto
diff options
context:
space:
mode:
authortb <>2026-05-08 04:28:28 +0000
committertb <>2026-05-08 04:28:28 +0000
commit4d89211bb686f07883f3ef617d15c1b624b89be3 (patch)
tree6124adf7aba6b4a320dbbf93baa440df059e95c7 /src/lib/libcrypto
parente5b3f3747cec5c007c69a9508b512bb37292fe74 (diff)
downloadopenbsd-4d89211bb686f07883f3ef617d15c1b624b89be3.tar.gz
openbsd-4d89211bb686f07883f3ef617d15c1b624b89be3.tar.bz2
openbsd-4d89211bb686f07883f3ef617d15c1b624b89be3.zip
x509_purp: fix doc comment for check_ca()
This comment has gotten out of sync with reality. The "I don't know..." fallback was removed and a special case for netscape CAs was added. Sync from the manual and add some more details. Pointed out by Maximilian Radoy in https://github.com/libressl/portable/issues/1274 ok kenjiro
Diffstat (limited to 'src/lib/libcrypto')
-rw-r--r--src/lib/libcrypto/x509/x509_purp.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/libcrypto/x509/x509_purp.c b/src/lib/libcrypto/x509/x509_purp.c
index 36dfe6abee..ff6d272d39 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.44 2025/05/10 05:54:39 tb Exp $ */ 1/* $OpenBSD: x509_purp.c,v 1.45 2026/05/08 04:28:28 tb 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 */
@@ -580,13 +580,17 @@ x509v3_cache_extensions(X509 *x)
580 return (x->ex_flags & EXFLAG_INVALID) == 0; 580 return (x->ex_flags & EXFLAG_INVALID) == 0;
581} 581}
582 582
583/* CA checks common to all purposes 583/*
584 * CA checks common to all purposes
584 * return codes: 585 * return codes:
585 * 0 not a CA 586 * 0 not a CA
586 * 1 is a CA 587 * 1 is a CA per RFC 5280.
587 * 2 basicConstraints absent so "maybe" a CA 588 * 2 basicConstraints absent so "maybe" a CA
589 * "I don't know..." fallback removed in 2004 (OpenSSL commit 8f284faa)
588 * 3 basicConstraints absent but self signed V1. 590 * 3 basicConstraints absent but self signed V1.
589 * 4 basicConstraints absent but keyUsage present and keyCertSign asserted. 591 * 4 basicConstraints absent but keyUsage present and keyCertSign asserted.
592 * 5 basicConstraints absent but outdated Netscape Certificate Type extension
593 * indicates that it is a CA certificate
590 */ 594 */
591 595
592static int 596static int