Bug 1369806: Fix up pkix test to correctly pass zero to CreateEncodedBasicConstraints (which takes a pointer-to-long, rather than a long). r=keeler
authorDaniel Holbert <dholbert@cs.stanford.edu>
Fri, 02 Jun 2017 13:21:53 -0700
changeset 412597 ea498127969f442dba5cd81ac554bca5f9490d99
parent 412596 95432b49cac4e582c9d84907ea1c3bfd1fd2ff52
child 412598 eb1d5848152b5f0cb2eeff48bce5996410a3597b
push id1490
push usermtabara@mozilla.com
push dateMon, 31 Jul 2017 14:08:16 +0000
treeherdermozilla-release@70e32e6bf15e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskeeler
bugs1369806
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1369806: Fix up pkix test to correctly pass zero to CreateEncodedBasicConstraints (which takes a pointer-to-long, rather than a long). r=keeler MozReview-Commit-ID: Ki8AHuW5zyP
security/pkix/test/gtest/pkixocsp_VerifyEncodedOCSPResponse.cpp
--- a/security/pkix/test/gtest/pkixocsp_VerifyEncodedOCSPResponse.cpp
+++ b/security/pkix/test/gtest/pkixocsp_VerifyEncodedOCSPResponse.cpp
@@ -817,20 +817,21 @@ TEST_F(pkixocsp_VerifyEncodedResponse_De
 // The CA that issued the OCSP responder cert is a sub-CA of the issuer of
 // the certificate that the OCSP response is for. That sub-CA cert is included
 // in the OCSP response before the OCSP responder cert.
 TEST_F(pkixocsp_VerifyEncodedResponse_DelegatedResponder,
        good_indirect_subca_1_first)
 {
   static const char* subCAName = "good_indirect_subca_1_first sub-CA";
   static const char* signerName = "good_indirect_subca_1_first OCSP signer";
+  static const long zero = 0;
 
   // sub-CA of root (root is the direct issuer of endEntity)
   const ByteString subCAExtensions[] = {
-    CreateEncodedBasicConstraints(true, 0, Critical::No),
+    CreateEncodedBasicConstraints(true, &zero, Critical::No),
     ByteString()
   };
   ScopedTestKeyPair subCAKeyPair(GenerateKeyPair());
   ByteString subCADER(CreateEncodedCertificate(
                         ++rootIssuedCount, sha256WithRSAEncryption(), rootName,
                         oneDayBeforeNow, oneDayAfterNow, subCAName,
                         *subCAKeyPair, subCAExtensions, *rootKeyPair));
   ASSERT_FALSE(ENCODING_FAILED(subCADER));
@@ -870,20 +871,21 @@ TEST_F(pkixocsp_VerifyEncodedResponse_De
 // The CA that issued the OCSP responder cert is a sub-CA of the issuer of
 // the certificate that the OCSP response is for. That sub-CA cert is included
 // in the OCSP response after the OCSP responder cert.
 TEST_F(pkixocsp_VerifyEncodedResponse_DelegatedResponder,
        good_indirect_subca_1_second)
 {
   static const char* subCAName = "good_indirect_subca_1_second sub-CA";
   static const char* signerName = "good_indirect_subca_1_second OCSP signer";
+  static const long zero = 0;
 
   // sub-CA of root (root is the direct issuer of endEntity)
   const ByteString subCAExtensions[] = {
-    CreateEncodedBasicConstraints(true, 0, Critical::No),
+    CreateEncodedBasicConstraints(true, &zero, Critical::No),
     ByteString()
   };
   ScopedTestKeyPair subCAKeyPair(GenerateKeyPair());
   ByteString subCADER(CreateEncodedCertificate(++rootIssuedCount,
                                                sha256WithRSAEncryption(),
                                                rootName,
                                                oneDayBeforeNow, oneDayAfterNow,
                                                subCAName, *subCAKeyPair,