From 621b1dcd5f9d97d915679b03998ed294c358cf3a Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Mon, 21 Nov 2016 08:49:36 +0100 Subject: [PATCH] Bug 1318030 - Possible uninitialised value uses relating to security/pkix/test/gtest/pkixcert_extension_tests.cpp. r=dkeeler@mozilla.com. --- .../test/gtest/pkixcert_extension_tests.cpp | 5 ++++ .../pkixcert_signature_algorithm_tests.cpp | 11 ++++++++ .../pkixcheck_CheckExtendedKeyUsage_tests.cpp | 10 +++++++ ...kixcheck_CheckSignatureAlgorithm_tests.cpp | 6 +++++ ...eck_TLSFeaturesSatisfiedInternal_tests.cpp | 5 ++++ .../gtest/pkixder_universal_types_tests.cpp | 5 ++++ security/pkix/test/gtest/pkixnames_tests.cpp | 26 +++++++++++++++++++ 7 files changed, 68 insertions(+) diff --git a/security/pkix/test/gtest/pkixcert_extension_tests.cpp b/security/pkix/test/gtest/pkixcert_extension_tests.cpp index 464643134b25..55b77f8946fc 100644 --- a/security/pkix/test/gtest/pkixcert_extension_tests.cpp +++ b/security/pkix/test/gtest/pkixcert_extension_tests.cpp @@ -122,6 +122,11 @@ struct ExtensionTestcase Result expectedResult; }; +::std::ostream& operator<<(::std::ostream& os, const ExtensionTestcase&) +{ + return os << "TODO (bug 1318770)"; +} + static const ExtensionTestcase EXTENSION_TESTCASES[] = { // Tests that a non-critical extension not in the id-ce or id-pe arcs (which diff --git a/security/pkix/test/gtest/pkixcert_signature_algorithm_tests.cpp b/security/pkix/test/gtest/pkixcert_signature_algorithm_tests.cpp index 924c2b053547..a84e244de264 100644 --- a/security/pkix/test/gtest/pkixcert_signature_algorithm_tests.cpp +++ b/security/pkix/test/gtest/pkixcert_signature_algorithm_tests.cpp @@ -186,6 +186,17 @@ class pkixcert_IsValidChainForAlgorithm { }; +::std::ostream& operator<<(::std::ostream& os, + const pkixcert_IsValidChainForAlgorithm&) +{ + return os << "TODO (bug 1318770)"; +} + +::std::ostream& operator<<(::std::ostream& os, const ChainValidity&) +{ + return os << "TODO (bug 1318770)"; +} + TEST_P(pkixcert_IsValidChainForAlgorithm, IsValidChainForAlgorithm) { const ChainValidity& chainValidity(GetParam()); diff --git a/security/pkix/test/gtest/pkixcheck_CheckExtendedKeyUsage_tests.cpp b/security/pkix/test/gtest/pkixcheck_CheckExtendedKeyUsage_tests.cpp index 4bfbd22656bd..f3f3d44947c4 100644 --- a/security/pkix/test/gtest/pkixcheck_CheckExtendedKeyUsage_tests.cpp +++ b/security/pkix/test/gtest/pkixcheck_CheckExtendedKeyUsage_tests.cpp @@ -160,6 +160,11 @@ struct EKUTestcase Result expectedResultCA; }; +::std::ostream& operator<<(::std::ostream& os, const EKUTestcase&) +{ + return os << "TODO (bug 1318770)"; +} + class CheckExtendedKeyUsageTest : public ::testing::Test , public ::testing::WithParamInterface @@ -480,6 +485,11 @@ struct EKUChainTestcase Result expectedResult; }; +::std::ostream& operator<<(::std::ostream& os, const EKUChainTestcase&) +{ + return os << "TODO (bug 1318770)"; +} + class CheckExtendedKeyUsageChainTest : public ::testing::Test , public ::testing::WithParamInterface diff --git a/security/pkix/test/gtest/pkixcheck_CheckSignatureAlgorithm_tests.cpp b/security/pkix/test/gtest/pkixcheck_CheckSignatureAlgorithm_tests.cpp index 7ab9d095acb4..f0b0425a01db 100644 --- a/security/pkix/test/gtest/pkixcheck_CheckSignatureAlgorithm_tests.cpp +++ b/security/pkix/test/gtest/pkixcheck_CheckSignatureAlgorithm_tests.cpp @@ -46,6 +46,12 @@ struct CheckSignatureAlgorithmTestParams Result expectedResult; }; +::std::ostream& operator<<(::std::ostream& os, + const CheckSignatureAlgorithmTestParams&) +{ + return os << "TODO (bug 1318770)"; +} + #define BS(s) ByteString(s, MOZILLA_PKIX_ARRAY_LENGTH(s)) // python DottedOIDToCode.py --tlv sha256WithRSAEncryption 1.2.840.113549.1.1.11 diff --git a/security/pkix/test/gtest/pkixcheck_TLSFeaturesSatisfiedInternal_tests.cpp b/security/pkix/test/gtest/pkixcheck_TLSFeaturesSatisfiedInternal_tests.cpp index 28db4d15080a..6149286de3c5 100644 --- a/security/pkix/test/gtest/pkixcheck_TLSFeaturesSatisfiedInternal_tests.cpp +++ b/security/pkix/test/gtest/pkixcheck_TLSFeaturesSatisfiedInternal_tests.cpp @@ -40,6 +40,11 @@ struct TLSFeaturesTestParams Result expectedResultWithoutResponse; }; +::std::ostream& operator<<(::std::ostream& os, const TLSFeaturesTestParams&) +{ + return os << "TODO (bug 1318770)"; +} + #define BS(s) ByteString(s, MOZILLA_PKIX_ARRAY_LENGTH(s)) static const uint8_t statusRequest[] = { 0x30, 0x03, 0x02, 0x01, 0x05 diff --git a/security/pkix/test/gtest/pkixder_universal_types_tests.cpp b/security/pkix/test/gtest/pkixder_universal_types_tests.cpp index bf4175bac5a9..8e21fc50dfdb 100644 --- a/security/pkix/test/gtest/pkixder_universal_types_tests.cpp +++ b/security/pkix/test/gtest/pkixder_universal_types_tests.cpp @@ -913,6 +913,11 @@ class pkixder_universal_types_tests_Integer { }; +::std::ostream& operator<<(::std::ostream& os, const IntegerTestParams&) +{ + return os << "TODO (bug 1318770)"; +} + #define INVALID 0xFF static const IntegerTestParams INTEGER_TEST_PARAMS[] = diff --git a/security/pkix/test/gtest/pkixnames_tests.cpp b/security/pkix/test/gtest/pkixnames_tests.cpp index 9e2303ad0e15..a328234af1b8 100644 --- a/security/pkix/test/gtest/pkixnames_tests.cpp +++ b/security/pkix/test/gtest/pkixnames_tests.cpp @@ -50,6 +50,11 @@ struct PresentedMatchesReference bool expectedMatches; // only valid when expectedResult == Success }; +::std::ostream& operator<<(::std::ostream& os, const PresentedMatchesReference&) +{ + return os << "TODO (bug 1318770)"; +} + #define DNS_ID_MATCH(a, b) \ { \ ByteString(reinterpret_cast(a), sizeof(a) - 1), \ @@ -319,6 +324,11 @@ struct InputValidity bool isValidPresentedID; }; +::std::ostream& operator<<(::std::ostream& os, const InputValidity&) +{ + return os << "TODO (bug 1318770)"; +} + // str is null-terminated, which is why we subtract 1. str may contain embedded // nulls (including at the end) preceding the null terminator though. #define I(str, validReferenceID, validPresentedID) \ @@ -572,6 +582,12 @@ struct IPAddressParams uint8_t expectedValueIfValid[L]; }; +template +::std::ostream& operator<<(::std::ostream& os, const IPAddressParams&) +{ + return os << "TODO (bug 1318770)"; +} + #define IPV4_VALID(str, a, b, c, d) \ { \ ByteString(reinterpret_cast(str), sizeof(str) - 1), \ @@ -1080,6 +1096,11 @@ struct CheckCertHostnameParams Result result; }; +::std::ostream& operator<<(::std::ostream& os, const CheckCertHostnameParams&) +{ + return os << "TODO (bug 1318770)"; +} + class pkixnames_CheckCertHostname : public ::testing::Test , public ::testing::WithParamInterface @@ -1811,6 +1832,11 @@ struct NameConstraintParams Result expectedExcludedSubtreesResult; }; +::std::ostream& operator<<(::std::ostream& os, const NameConstraintParams&) +{ + return os << "TODO (bug 1318770)"; +} + static ByteString PermittedSubtrees(const ByteString& generalSubtrees) {