Refactor expiration calculation
authorjob <job@openbsd.org>
Sun, 12 Mar 2023 11:54:56 +0000 (11:54 +0000)
committerjob <job@openbsd.org>
Sun, 12 Mar 2023 11:54:56 +0000 (11:54 +0000)
commit534b66744e524ce410e2e89e31afae364e1a3e71
treec9c7c6d3ac3d70a148fc9e9492bacd968945e7c0
parente8872944128f3e6b75d300e794f06c5ae149effd
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@
usr.sbin/rpki-client/aspa.c
usr.sbin/rpki-client/extern.h
usr.sbin/rpki-client/mft.c
usr.sbin/rpki-client/parser.c
usr.sbin/rpki-client/roa.c
usr.sbin/rpki-client/x509.c