Skip to content

Commit 7718519

Browse files
committed
cert_parse_ee_cert: add explanatory comment for x509_get_purpose()
ok claudio
1 parent 25d8c64 commit 7718519

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

usr.sbin/rpki-client/cert.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: cert.c,v 1.161 2025/06/19 06:20:23 tb Exp $ */
1+
/* $OpenBSD: cert.c,v 1.162 2025/06/19 06:47:57 tb Exp $ */
22
/*
33
* Copyright (c) 2022 Theo Buehler <[email protected]>
44
* Copyright (c) 2021 Job Snijders <[email protected]>
@@ -762,6 +762,10 @@ cert_parse_ee_cert(const char *fn, int talid, X509 *x)
762762
if (!x509_cache_extensions(x, fn))
763763
goto out;
764764

765+
/*
766+
* Check issuance, basic constraints and (extended) key usage bits are
767+
* appropriate for an EE cert. Covers RFC 6487, 4.8.1, 4.8.4, 4.8.5.
768+
*/
765769
if ((cert->purpose = x509_get_purpose(x, fn)) != CERT_PURPOSE_EE) {
766770
warnx("%s: expected EE cert, got %s", fn,
767771
purpose2str(cert->purpose));

0 commit comments

Comments
 (0)