summaryrefslogtreecommitdiff
path: root/usr.sbin/rpki-client/mft.c
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2024-09-12 10:33:26 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2024-09-12 10:33:26 +0000
commit5ed460ee4f504c3239698d22c9b0f827a023bfa0 (patch)
tree8c61a1eac55d24caf666df03599928efe76aee98 /usr.sbin/rpki-client/mft.c
parent37261180a7519229aa7700e0fed5d12311c51883 (diff)
Reintroduce check that CRL Number is in range
The CRL number draft clarified what ignoring means and it includes checking that the CRL number is well-formed again. So do this but continue to ignore the value for any other purpose. This refactors x509_convert_seqnum() into a couple of helpers. There's some duplication between crl_check_crl_number() and crl_parse_crl_number() which could be removed if anyone cares. tweaks/ok job
Diffstat (limited to 'usr.sbin/rpki-client/mft.c')
-rw-r--r--usr.sbin/rpki-client/mft.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/rpki-client/mft.c b/usr.sbin/rpki-client/mft.c
index 238b6865916..e981e04b7be 100644
--- a/usr.sbin/rpki-client/mft.c
+++ b/usr.sbin/rpki-client/mft.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mft.c,v 1.118 2024/09/08 07:23:36 tb Exp $ */
+/* $OpenBSD: mft.c,v 1.119 2024/09/12 10:33:25 tb Exp $ */
/*
* Copyright (c) 2022 Theo Buehler <tb@openbsd.org>
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
@@ -333,7 +333,8 @@ mft_parse_econtent(const char *fn, struct mft *mft, const unsigned char *d,
if (!valid_econtent_version(fn, mft_asn1->version, 0))
goto out;
- mft->seqnum = x509_convert_seqnum(fn, mft_asn1->manifestNumber);
+ mft->seqnum = x509_convert_seqnum(fn, "manifest number",
+ mft_asn1->manifestNumber);
if (mft->seqnum == NULL)
goto out;