summaryrefslogtreecommitdiff
path: root/usr.sbin/rpki-client/cert.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/rpki-client/cert.c')
-rw-r--r--usr.sbin/rpki-client/cert.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.sbin/rpki-client/cert.c b/usr.sbin/rpki-client/cert.c
index 92bc54bb34d..2ce5f63e592 100644
--- a/usr.sbin/rpki-client/cert.c
+++ b/usr.sbin/rpki-client/cert.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cert.c,v 1.95 2022/11/04 12:05:36 tb Exp $ */
+/* $OpenBSD: cert.c,v 1.96 2022/11/07 16:23:32 job Exp $ */
/*
* Copyright (c) 2022 Theo Buehler <tb@openbsd.org>
* Copyright (c) 2021 Job Snijders <job@openbsd.org>
@@ -475,8 +475,12 @@ sbgp_sia(struct parse *p, X509_EXTENSION *ext)
}
mftfilename = strrchr(p->res->mft, '/');
- if (mftfilename == NULL || !valid_filename(mftfilename + 1,
- strlen(mftfilename) - 1)) {
+ if (mftfilename == NULL) {
+ warnx("%s: SIA: invalid rpkiManifest entry", p->fn);
+ goto out;
+ }
+ mftfilename++;
+ if (!valid_filename(mftfilename, strlen(mftfilename))) {
warnx("%s: SIA: rpkiManifest filename contains invalid "
"characters", p->fn);
goto out;