From ef8bdb37b2d623136784fba79ffa45f028dffd25 Mon Sep 17 00:00:00 2001 From: job Date: Sat, 26 Nov 2022 17:14:40 +0000 Subject: [PATCH] Make error messages about 'inherit' elements in End-Entity certs consistent OK tb@ --- usr.sbin/rpki-client/aspa.c | 4 ++-- usr.sbin/rpki-client/cert.c | 6 +++--- usr.sbin/rpki-client/roa.c | 4 ++-- usr.sbin/rpki-client/rsc.c | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/usr.sbin/rpki-client/aspa.c b/usr.sbin/rpki-client/aspa.c index aab730b8ce4..e7a948d7a11 100644 --- a/usr.sbin/rpki-client/aspa.c +++ b/usr.sbin/rpki-client/aspa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aspa.c,v 1.7 2022/11/04 09:43:13 job Exp $ */ +/* $OpenBSD: aspa.c,v 1.8 2022/11/26 17:14:40 job Exp $ */ /* * Copyright (c) 2022 Job Snijders * Copyright (c) 2022 Theo Buehler @@ -234,7 +234,7 @@ aspa_parse(X509 **x509, const char *fn, const unsigned char *der, size_t len) } if (x509_any_inherits(*x509)) { - warnx("%s: inherit elements not allowed", fn); + warnx("%s: inherit elements not allowed in EE cert", fn); goto out; } diff --git a/usr.sbin/rpki-client/cert.c b/usr.sbin/rpki-client/cert.c index 84c48aabf93..04a387dee96 100644 --- a/usr.sbin/rpki-client/cert.c +++ b/usr.sbin/rpki-client/cert.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cert.c,v 1.97 2022/11/08 08:15:39 tb Exp $ */ +/* $OpenBSD: cert.c,v 1.98 2022/11/26 17:14:40 job Exp $ */ /* * Copyright (c) 2022 Theo Buehler * Copyright (c) 2021 Job Snijders @@ -781,8 +781,8 @@ cert_parse_pre(const char *fn, const unsigned char *der, size_t len) } for (i = 0; i < p.res->asz; i++) { if (p.res->as[i].type == CERT_AS_INHERIT) { - warnx("%s: inherited AS numbers in BGPsec cert", - p.fn); + warnx("%s: inherit elements not allowed in EE" + " cert", p.fn); goto out; } } diff --git a/usr.sbin/rpki-client/roa.c b/usr.sbin/rpki-client/roa.c index c9ddca720f4..ef0564a5fa6 100644 --- a/usr.sbin/rpki-client/roa.c +++ b/usr.sbin/rpki-client/roa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: roa.c,v 1.56 2022/11/09 18:17:23 job Exp $ */ +/* $OpenBSD: roa.c,v 1.57 2022/11/26 17:14:40 job Exp $ */ /* * Copyright (c) 2022 Theo Buehler * Copyright (c) 2019 Kristaps Dzonsons @@ -255,7 +255,7 @@ roa_parse(X509 **x509, const char *fn, const unsigned char *der, size_t len) goto out; if (x509_any_inherits(*x509)) { - warnx("%s: inherit elements not allowed", fn); + warnx("%s: inherit elements not allowed in EE cert", fn); goto out; } diff --git a/usr.sbin/rpki-client/rsc.c b/usr.sbin/rpki-client/rsc.c index b53d089db8c..ff3bf5fb771 100644 --- a/usr.sbin/rpki-client/rsc.c +++ b/usr.sbin/rpki-client/rsc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsc.c,v 1.18 2022/11/02 12:46:49 job Exp $ */ +/* $OpenBSD: rsc.c,v 1.19 2022/11/26 17:14:40 job Exp $ */ /* * Copyright (c) 2022 Theo Buehler * Copyright (c) 2022 Job Snijders @@ -419,7 +419,7 @@ rsc_parse(X509 **x509, const char *fn, const unsigned char *der, size_t len) } if (x509_any_inherits(*x509)) { - warnx("%s: inherit elements not allowed", fn); + warnx("%s: inherit elements not allowed in EE cert", fn); goto out; } -- 2.20.1