Bug 1549010 - verify add-on signing certificates at 2019-04-27T02:43:20.000Z r=jcj a=lizzard
☠☠ backed out by ebb01d9ac1c9 ☠ ☠
authorDana Keeler <dkeeler@mozilla.com>
Sat, 04 May 2019 04:15:11 +0000
changeset 526487 d716b75b8ac3f4588061e720074c093dae08e43e
parent 526486 a4417ce665b2bac2cf391dac60d0b3deaf38e63f
child 526488 f272348572e8160a73001b85013f35db51397064
push id2032
push userffxbld-merge
push dateMon, 13 May 2019 09:36:57 +0000
treeherdermozilla-release@455c1065dcbe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjcj, lizzard
bugs1549010
milestone67.0
Bug 1549010 - verify add-on signing certificates at 2019-04-27T02:43:20.000Z r=jcj a=lizzard Differential Revision: https://phabricator.services.mozilla.com/D29928
security/apps/AppSignatureVerification.cpp
--- a/security/apps/AppSignatureVerification.cpp
+++ b/security/apps/AppSignatureVerification.cpp
@@ -632,18 +632,20 @@ nsresult VerifyCertificate(CERTCertifica
   }
   Input certDER;
   mozilla::pkix::Result result =
       certDER.Init(signerCert->derCert.data, signerCert->derCert.len);
   if (result != Success) {
     return mozilla::psm::GetXPCOMFromNSSError(MapResultToPRErrorCode(result));
   }
 
+  // 1556333000 seconds since the epoch should be about 2019-04-27T02:43:20.000Z
+  Time verificationTime = TimeFromEpochInSeconds(1556333000);
   result = BuildCertChain(
-      trustDomain, certDER, Now(), EndEntityOrCA::MustBeEndEntity,
+      trustDomain, certDER, verificationTime, EndEntityOrCA::MustBeEndEntity,
       KeyUsage::digitalSignature, KeyPurposeId::id_kp_codeSigning,
       CertPolicyId::anyPolicy, nullptr /*stapledOCSPResponse*/);
   if (result == mozilla::pkix::Result::ERROR_EXPIRED_CERTIFICATE) {
     // For code-signing you normally need trusted 3rd-party timestamps to
     // handle expiration properly. The signer could always mess with their
     // system clock so you can't trust the certificate was un-expired when
     // the signing took place. The choice is either to ignore expiration
     // or to enforce expiration at time of use. The latter leads to the