Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/base/x509_certificate.h" | 5 #include "net/base/x509_certificate.h" |
| 6 | 6 |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 954 | 954 |
| 955 return false; | 955 return false; |
| 956 } | 956 } |
| 957 | 957 |
| 958 // static | 958 // static |
| 959 bool X509Certificate::IsPublicKeyBlacklisted( | 959 bool X509Certificate::IsPublicKeyBlacklisted( |
| 960 const std::vector<SHA1Fingerprint>& public_key_hashes) { | 960 const std::vector<SHA1Fingerprint>& public_key_hashes) { |
| 961 static const unsigned kNumHashes = 5; | 961 static const unsigned kNumHashes = 5; |
| 962 static const uint8 kHashes[kNumHashes][base::SHA1_LENGTH] = { | 962 static const uint8 kHashes[kNumHashes][base::SHA1_LENGTH] = { |
| 963 // Subject: CN=DigiNotar Root CA | 963 // Subject: CN=DigiNotar Root CA |
| 964 // Issuer: CN=Entrust.net x2 and self-signed | 964 // Issuer: CN=Entrust.net x2 and self-signed |
|
wtc
2011/09/12 18:59:53
Do you have the certificate signed by Entrust.net
agl
2011/09/12 22:34:28
Sadly not and I can't find it either. (I don't bel
| |
| 965 {0x41, 0x0f, 0x36, 0x36, 0x32, 0x58, 0xf3, 0x0b, 0x34, 0x7d, | 965 {0x41, 0x0f, 0x36, 0x36, 0x32, 0x58, 0xf3, 0x0b, 0x34, 0x7d, |
| 966 0x12, 0xce, 0x48, 0x63, 0xe4, 0x33, 0x43, 0x78, 0x06, 0xa8}, | 966 0x12, 0xce, 0x48, 0x63, 0xe4, 0x33, 0x43, 0x78, 0x06, 0xa8}, |
| 967 // Subject: CN=DigiNotar Cyber CA | 967 // Subject: CN=DigiNotar Cyber CA |
| 968 // Issuer: CN=GTE CyberTrust Global Root | 968 // Issuer: CN=GTE CyberTrust Global Root |
| 969 {0xba, 0x3e, 0x7b, 0xd3, 0x8c, 0xd7, 0xe1, 0xe6, 0xb9, 0xcd, | 969 {0xc4, 0xf9, 0x66, 0x37, 0x16, 0xcd, 0x5e, 0x71, 0xd6, 0x95, |
| 970 0x4c, 0x21, 0x99, 0x62, 0xe5, 0x9d, 0x7a, 0x2f, 0x4e, 0x37}, | 970 0x0b, 0x5f, 0x33, 0xce, 0x04, 0x1c, 0x95, 0xb4, 0x35, 0xd1}, |
| 971 // Subject: CN=DigiNotar Services 1024 CA | 971 // Subject: CN=DigiNotar Services 1024 CA |
| 972 // Issuer: CN=Entrust.net | 972 // Issuer: CN=Entrust.net |
| 973 {0xe2, 0x3b, 0x8d, 0x10, 0x5f, 0x87, 0x71, 0x0a, 0x68, 0xd9, | 973 {0xe2, 0x3b, 0x8d, 0x10, 0x5f, 0x87, 0x71, 0x0a, 0x68, 0xd9, |
| 974 0x24, 0x80, 0x50, 0xeb, 0xef, 0xc6, 0x27, 0xbe, 0x4c, 0xa6}, | 974 0x24, 0x80, 0x50, 0xeb, 0xef, 0xc6, 0x27, 0xbe, 0x4c, 0xa6}, |
| 975 // Subject: CN=DigiNotar PKIoverheid CA Organisatie - G2 | 975 // Subject: CN=DigiNotar PKIoverheid CA Organisatie - G2 |
| 976 // Issuer: CN=Staat der Nederlanden Organisatie CA - G2 | 976 // Issuer: CN=Staat der Nederlanden Organisatie CA - G2 |
| 977 {0x7b, 0x2e, 0x16, 0xbc, 0x39, 0xbc, 0xd7, 0x2b, 0x45, 0x6e, | 977 {0x7b, 0x2e, 0x16, 0xbc, 0x39, 0xbc, 0xd7, 0x2b, 0x45, 0x6e, |
| 978 0x9f, 0x05, 0x5d, 0x1d, 0xe6, 0x15, 0xb7, 0x49, 0x45, 0xdb}, | 978 0x9f, 0x05, 0x5d, 0x1d, 0xe6, 0x15, 0xb7, 0x49, 0x45, 0xdb}, |
| 979 // Subject: CN=DigiNotar PKIoverheid CA Overheid en Bedrijven | 979 // Subject: CN=DigiNotar PKIoverheid CA Overheid en Bedrijven |
| 980 // Issuer: CN=Staat der Nederlanden Overheid CA | 980 // Issuer: CN=Staat der Nederlanden Overheid CA |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 997 bool X509Certificate::IsSHA1HashInSortedArray(const SHA1Fingerprint& hash, | 997 bool X509Certificate::IsSHA1HashInSortedArray(const SHA1Fingerprint& hash, |
| 998 const uint8* array, | 998 const uint8* array, |
| 999 size_t array_byte_len) { | 999 size_t array_byte_len) { |
| 1000 DCHECK_EQ(0u, array_byte_len % base::SHA1_LENGTH); | 1000 DCHECK_EQ(0u, array_byte_len % base::SHA1_LENGTH); |
| 1001 const unsigned arraylen = array_byte_len / base::SHA1_LENGTH; | 1001 const unsigned arraylen = array_byte_len / base::SHA1_LENGTH; |
| 1002 return NULL != bsearch(hash.data, array, arraylen, base::SHA1_LENGTH, | 1002 return NULL != bsearch(hash.data, array, arraylen, base::SHA1_LENGTH, |
| 1003 CompareSHA1Hashes); | 1003 CompareSHA1Hashes); |
| 1004 } | 1004 } |
| 1005 | 1005 |
| 1006 } // namespace net | 1006 } // namespace net |
| OLD | NEW |