From 1109c1b8259ad840ac1688d533f76ca268c67b6b Mon Sep 17 00:00:00 2001
From: "John M. Schanck" <jschanck@mozilla.com>
Date: Sat, 5 Feb 2022 11:12:43 +0000
Subject: [PATCH] Bug 1750624 - Pin validation date for PayPalEE test cert.
 r=nss-reviewers,bbeurdouche,rrelyea

Differential Revision: https://phabricator.services.mozilla.com/D136289

--HG--
extra : moz-landing-system : lando

Upstream-Status: Backport

---
 tests/chains/chains.sh               | 6 +++++-
 tests/chains/scenarios/realcerts.cfg | 1 +
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/tests/chains/chains.sh b/tests/chains/chains.sh
index 32c7ef54c..e13ae52f9 100755
--- a/nss/tests/chains/chains.sh
+++ b/nss/tests/chains/chains.sh
@@ -917,7 +917,7 @@ verify_cert()
     done
 
     VFY_OPTS_TNAME="${DB_OPT} ${ENGINE} ${TRUST_AND_DB_OPT} ${REV_OPTS} ${FETCH_OPT} ${USAGE_OPT} ${POLICY_OPT} ${TRUST_OPT}"
-    VFY_OPTS_ALL="${DB_OPT} ${ENGINE} -vv ${TRUST_AND_DB_OPT} ${REV_OPTS} ${FETCH_OPT} ${USAGE_OPT} ${POLICY_OPT} ${VFY_CERTS} ${TRUST_OPT}"
+    VFY_OPTS_ALL="${DB_OPT} ${ENGINE} -vv ${VFY_TIME_OPT} ${TRUST_AND_DB_OPT} ${REV_OPTS} ${FETCH_OPT} ${USAGE_OPT} ${POLICY_OPT} ${VFY_CERTS} ${TRUST_OPT}"
 
     TESTNAME="Verifying certificate(s) ${VFY_LIST} with flags ${VFY_OPTS_TNAME}"
     echo "${SCRIPTNAME}: ${TESTNAME}"
@@ -1118,6 +1118,7 @@ parse_config()
             ;;
         "verify")
             VERIFY="${VALUE}"
+            VFY_TIME_OPT=
             TRUST=
             TRUST_AND_DB=
             POLICY=
@@ -1126,6 +1127,9 @@ parse_config()
             REV_OPTS=
             USAGE_OPT=
             ;;
+        "at_time")
+            VFY_TIME_OPT="-b ${VALUE}"
+            ;;
         "cert")
             VERIFY="${VERIFY} ${VALUE}"
             ;;
diff --git a/tests/chains/scenarios/realcerts.cfg b/tests/chains/scenarios/realcerts.cfg
index 305443fc3..f8b0fc452 100644
--- a/nss/tests/chains/scenarios/realcerts.cfg
+++ b/nss/tests/chains/scenarios/realcerts.cfg
@@ -22,6 +22,7 @@ verify TestUser51:x
 
 verify PayPalEE:x
   policy OID.2.16.840.1.114412.2.1 
+  at_time 2201010000Z
   result pass
 
 verify BrAirWaysBadSig:x
-- 
2.25.1

