summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2022-06-04 02:14:22 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2022-06-04 02:14:22 +0000
commitaeb4db9b7017f4a831ac8655841a71193effca26 (patch)
treef7ddaf8084d390d5df0db83d26fa5f92fe96c16a
parent8b0205be87fc06678903e775596eb968219b68b7 (diff)
KNF nit
-rw-r--r--usr.sbin/rpki-client/rsc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.sbin/rpki-client/rsc.c b/usr.sbin/rpki-client/rsc.c
index c8baa236194..59280c65f33 100644
--- a/usr.sbin/rpki-client/rsc.c
+++ b/usr.sbin/rpki-client/rsc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rsc.c,v 1.8 2022/06/01 10:59:21 tb Exp $ */
+/* $OpenBSD: rsc.c,v 1.9 2022/06/04 02:14:21 tb Exp $ */
/*
* Copyright (c) 2022 Theo Buehler <tb@openbsd.org>
* Copyright (c) 2022 Job Snijders <job@fastly.com>
@@ -347,7 +347,7 @@ rsc_parse_econtent(const unsigned char *d, size_t dsz, struct parse *p)
goto out;
}
- switch(rsc_version) {
+ switch (rsc_version) {
case 0:
warnx("%s: RSC: incorrect version encoding", p->fn);
goto out;
@@ -418,6 +418,11 @@ rsc_parse(X509 **x509, const char *fn, const unsigned char *der, size_t len)
goto out;
}
+ if (X509_get_ext_by_NID(*x509, NID_sinfo_access, -1) != -1) {
+ warnx("%s: EE certificate MUST NOT have SIA extension", fn);
+ goto out;
+ }
+
at = X509_get0_notAfter(*x509);
if (at == NULL) {
warnx("%s: X509_get0_notAfter failed", fn);