| Index: net/base/x509_certificate.cc
|
| diff --git a/net/base/x509_certificate.cc b/net/base/x509_certificate.cc
|
| index 4934ef3c3aff1348a6323eb769ace33bc7fc1e1e..cc3bc992d93ac8d5dc65ca79196efd5337ef8603 100644
|
| --- a/net/base/x509_certificate.cc
|
| +++ b/net/base/x509_certificate.cc
|
| @@ -591,6 +591,28 @@ bool X509Certificate::IsBlacklisted() const {
|
| }
|
|
|
| // static
|
| +bool X509Certificate::IsPublicKeyBlacklisted(
|
| + const std::vector<SHA1Fingerprint>& public_key_hashes) {
|
| + static const unsigned kNumHashes = 1;
|
| + static const uint8 kHashes[kNumHashes][base::SHA1_LENGTH] = {
|
| + // CN=DigiNotar Root CA
|
| + {0x41, 0x0f, 0x36, 0x36, 0x32, 0x58, 0xf3, 0x0b, 0x34, 0x7d,
|
| + 0x12, 0xce, 0x48, 0x63, 0xe4, 0x33, 0x43, 0x78, 0x06, 0xa8},
|
| + };
|
| +
|
| + for (unsigned i = 0; i < kNumHashes; i++) {
|
| + for (std::vector<SHA1Fingerprint>::const_iterator
|
| + j = public_key_hashes.begin(); j != public_key_hashes.end(); ++j) {
|
| + if (memcmp(j->data, kHashes[i], base::SHA1_LENGTH) == 0)
|
| + return true;
|
| + }
|
| + }
|
| +
|
| + return false;
|
| +}
|
| +
|
| +
|
| +// static
|
| bool X509Certificate::IsSHA1HashInSortedArray(const SHA1Fingerprint& hash,
|
| const uint8* array,
|
| size_t array_byte_len) {
|
|
|