diff options
author | Job Snijders <job@cvs.openbsd.org> | 2023-03-12 11:54:57 +0000 |
---|---|---|
committer | Job Snijders <job@cvs.openbsd.org> | 2023-03-12 11:54:57 +0000 |
commit | 895f6ce1f3826b69e29e6cd75c0489f9dcb8eead (patch) | |
tree | 63a14379239c3657b3b8e1465b34756a130b9235 /usr.sbin/rpki-client/mft.c | |
parent | cd2b4d1c84e2d10548a6e220ea43e92cd24d51f4 (diff) |
Refactor expiration calculation
Unify common code paths which find the exact expiry moment into a new
helper function. Additionally, the new helper offers more accuracy by
checking more applicable CRLs whether their 'nextupdate' is 'sooner'.
tb@ noted: The helper adds a multiplier of log(#crls), but that's
certainly acceptable as it is still very cheap.
OK tb@
Diffstat (limited to 'usr.sbin/rpki-client/mft.c')
-rw-r--r-- | usr.sbin/rpki-client/mft.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/rpki-client/mft.c b/usr.sbin/rpki-client/mft.c index 2345d0fc586..a8848ed4856 100644 --- a/usr.sbin/rpki-client/mft.c +++ b/usr.sbin/rpki-client/mft.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mft.c,v 1.85 2023/03/12 11:46:35 tb Exp $ */ +/* $OpenBSD: mft.c,v 1.86 2023/03/12 11:54:56 job Exp $ */ /* * Copyright (c) 2022 Theo Buehler <tb@openbsd.org> * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> @@ -76,7 +76,7 @@ ASN1_SEQUENCE(FileAndHash) = { } ASN1_SEQUENCE_END(FileAndHash); ASN1_SEQUENCE(Manifest) = { - ASN1_EXP_OPT(Manifest, version, ASN1_INTEGER, 0), + ASN1_IMP_OPT(Manifest, version, ASN1_INTEGER, 0), ASN1_SIMPLE(Manifest, manifestNumber, ASN1_INTEGER), ASN1_SIMPLE(Manifest, thisUpdate, ASN1_GENERALIZEDTIME), ASN1_SIMPLE(Manifest, nextUpdate, ASN1_GENERALIZEDTIME), |