From 4d89211bb686f07883f3ef617d15c1b624b89be3 Mon Sep 17 00:00:00 2001 From: tb <> Date: Fri, 8 May 2026 04:28:28 +0000 Subject: 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 --- src/lib/libcrypto/x509/x509_purp.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src') 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 @@ -/* $OpenBSD: x509_purp.c,v 1.44 2025/05/10 05:54:39 tb Exp $ */ +/* $OpenBSD: x509_purp.c,v 1.45 2026/05/08 04:28:28 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2001. */ @@ -580,13 +580,17 @@ x509v3_cache_extensions(X509 *x) return (x->ex_flags & EXFLAG_INVALID) == 0; } -/* CA checks common to all purposes +/* + * CA checks common to all purposes * return codes: * 0 not a CA - * 1 is a CA + * 1 is a CA per RFC 5280. * 2 basicConstraints absent so "maybe" a CA + * "I don't know..." fallback removed in 2004 (OpenSSL commit 8f284faa) * 3 basicConstraints absent but self signed V1. * 4 basicConstraints absent but keyUsage present and keyCertSign asserted. + * 5 basicConstraints absent but outdated Netscape Certificate Type extension + * indicates that it is a CA certificate */ static int -- cgit v1.2.3-55-g6feb