diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2022-06-04 02:14:22 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2022-06-04 02:14:22 +0000 |
commit | aeb4db9b7017f4a831ac8655841a71193effca26 (patch) | |
tree | f7ddaf8084d390d5df0db83d26fa5f92fe96c16a /usr.sbin/rpki-client | |
parent | 8b0205be87fc06678903e775596eb968219b68b7 (diff) |
KNF nit
Diffstat (limited to 'usr.sbin/rpki-client')
-rw-r--r-- | usr.sbin/rpki-client/rsc.c | 9 |
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); |