BGPsec certs are a bit weird and checks for them are all over the place,
some of them in the TA handling, which makes very little sense. We'd be
better off adding another purpose for trust anchors and use that instead.
ok claudio job
-/* $OpenBSD: cert.c,v 1.140 2024/06/06 12:38:02 tb Exp $ */
+/* $OpenBSD: cert.c,v 1.141 2024/06/07 08:36:54 tb Exp $ */
/*
* Copyright (c) 2022 Theo Buehler <tb@openbsd.org>
* Copyright (c) 2021 Job Snijders <job@openbsd.org>
"trust anchor may not specify CRL resource", fn);
goto badcert;
}
+ /*
+ * XXX - this check for BGPsec router certs doesn't make all that much
+ * sense. Consider introducing a TA purpose for self-issued CA certs.
+ */
if (p->purpose == CERT_PURPOSE_BGPSEC_ROUTER) {
warnx("%s: BGPsec cert cannot be a trust anchor", fn);
goto badcert;
-/* $OpenBSD: x509.c,v 1.93 2024/06/04 14:17:24 tb Exp $ */
+/* $OpenBSD: x509.c,v 1.94 2024/06/07 08:36:54 tb Exp $ */
/*
* Copyright (c) 2022 Theo Buehler <tb@openbsd.org>
* Copyright (c) 2021 Claudio Jeker <claudio@openbsd.org>
goto out;
}
purpose = CERT_PURPOSE_CA;
+ /* XXX - we may want to check EXFLAG_SI and add a TA purpose. */
goto out;
}