Index: net/quic/crypto/common_cert_set.cc |
diff --git a/net/quic/crypto/common_cert_set.cc b/net/quic/crypto/common_cert_set.cc |
index cc4f91b6b9ac8421193600ef39a33ef6f4eb64c3..b60ac074003549952f6324b9f33422dd7344f750 100644 |
--- a/net/quic/crypto/common_cert_set.cc |
+++ b/net/quic/crypto/common_cert_set.cc |
@@ -17,6 +17,10 @@ namespace common_cert_set_0 { |
#include "net/quic/crypto/common_cert_set_0.c" |
} |
+namespace common_cert_set_1 { |
+#include "net/quic/crypto/common_cert_set_1.c" |
+} |
+ |
namespace { |
struct CertSet { |
@@ -38,10 +42,17 @@ const CertSet kSets[] = { |
common_cert_set_0::kLens, |
common_cert_set_0::kHash, |
}, |
+ { |
+ common_cert_set_1::kNumCerts, |
+ common_cert_set_1::kCerts, |
+ common_cert_set_1::kLens, |
+ common_cert_set_1::kHash, |
+ }, |
}; |
const uint64 kSetHashes[] = { |
common_cert_set_0::kHash, |
+ common_cert_set_1::kHash, |
}; |
// Compare returns a value less than, equal to or greater than zero if |a| is |
@@ -69,12 +80,12 @@ int Compare(StringPiece a, const unsigned char* b, size_t b_len) { |
class CommonCertSetsQUIC : public CommonCertSets { |
public: |
// CommonCertSets interface. |
- StringPiece GetCommonHashes() const override { |
+ virtual StringPiece GetCommonHashes() const override { |
return StringPiece(reinterpret_cast<const char*>(kSetHashes), |
sizeof(uint64) * arraysize(kSetHashes)); |
} |
- StringPiece GetCert(uint64 hash, uint32 index) const override { |
+ virtual StringPiece GetCert(uint64 hash, uint32 index) const override { |
for (size_t i = 0; i < arraysize(kSets); i++) { |
if (kSets[i].hash == hash) { |
if (index < kSets[i].num_certs) { |
@@ -89,10 +100,10 @@ class CommonCertSetsQUIC : public CommonCertSets { |
return StringPiece(); |
} |
- bool MatchCert(StringPiece cert, |
- StringPiece common_set_hashes, |
- uint64* out_hash, |
- uint32* out_index) const override { |
+ virtual bool MatchCert(StringPiece cert, |
+ StringPiece common_set_hashes, |
+ uint64* out_hash, |
+ uint32* out_index) const override { |
if (common_set_hashes.size() % sizeof(uint64) != 0) { |
return false; |
} |
@@ -142,7 +153,7 @@ class CommonCertSetsQUIC : public CommonCertSets { |
private: |
CommonCertSetsQUIC() {} |
- ~CommonCertSetsQUIC() override {} |
+ virtual ~CommonCertSetsQUIC() {} |
friend struct DefaultSingletonTraits<CommonCertSetsQUIC>; |
DISALLOW_COPY_AND_ASSIGN(CommonCertSetsQUIC); |