Issuing manifests whose validity window is entirely in the past, as
observed from the purported CMS signing-time would be a form of backdating.
OK tb@
-/* $OpenBSD: mft.c,v 1.88 2023/03/13 10:39:03 tb Exp $ */
+/* $OpenBSD: mft.c,v 1.89 2023/03/13 19:54:36 job Exp $ */
/*
* Copyright (c) 2022 Theo Buehler <tb@openbsd.org>
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
if (mft_parse_econtent(cms, cmsz, &p) == 0)
goto out;
+ if (p.res->signtime > p.res->nextupdate) {
+ warnx("%s: dating issue: CMS signing-time after MFT nextUpdate",
+ fn);
+ goto out;
+ }
+
rc = 1;
out:
if (rc == 0) {