| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ev_root_ca_metadata.h" | 5 #include "net/base/ev_root_ca_metadata.h" |
| 6 | 6 |
| 7 #include "net/base/cert_test_util.h" | 7 #include "net/base/cert_test_util.h" |
| 8 #include "net/base/x509_cert_types.h" | 8 #include "net/base/x509_cert_types.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 10 |
| 11 #if defined(USE_NSS) | 11 #if defined(USE_NSS) |
| 12 #include "crypto/scoped_nss_types.h" | 12 #include "crypto/scoped_nss_types.h" |
| 13 #endif | 13 #endif |
| 14 | 14 |
| 15 namespace net { | 15 namespace net { |
| 16 | 16 |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 static const char kVerisignPolicy[] = "2.16.840.1.113733.1.7.23.6"; | 19 static const char kVerisignPolicy[] = "2.16.840.1.113733.1.7.23.6"; |
| 20 static const char kThawtePolicy[] = "2.16.840.1.113733.1.7.48.1"; | 20 static const char kThawtePolicy[] = "2.16.840.1.113733.1.7.48.1"; |
| 21 static const char kFakePolicy[] = "2.16.840.1.42"; | 21 static const char kFakePolicy[] = "2.16.840.1.42"; |
| 22 static const SHA1Fingerprint kVerisignFingerprint = | 22 static const SHA1HashValue kVerisignFingerprint = |
| 23 { { 0x74, 0x2c, 0x31, 0x92, 0xe6, 0x07, 0xe4, 0x24, 0xeb, 0x45, | 23 { { 0x74, 0x2c, 0x31, 0x92, 0xe6, 0x07, 0xe4, 0x24, 0xeb, 0x45, |
| 24 0x49, 0x54, 0x2b, 0xe1, 0xbb, 0xc5, 0x3e, 0x61, 0x74, 0xe2 } }; | 24 0x49, 0x54, 0x2b, 0xe1, 0xbb, 0xc5, 0x3e, 0x61, 0x74, 0xe2 } }; |
| 25 static const SHA1Fingerprint kFakeFingerprint = | 25 static const SHA1HashValue kFakeFingerprint = |
| 26 { { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, | 26 { { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, |
| 27 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99 } }; | 27 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99 } }; |
| 28 | 28 |
| 29 #if defined(USE_NSS) || defined(OS_WIN) | 29 #if defined(USE_NSS) || defined(OS_WIN) |
| 30 class EVOidData { | 30 class EVOidData { |
| 31 public: | 31 public: |
| 32 EVOidData(); | 32 EVOidData(); |
| 33 bool Init(); | 33 bool Init(); |
| 34 | 34 |
| 35 EVRootCAMetadata::PolicyOID verisign_policy; | 35 EVRootCAMetadata::PolicyOID verisign_policy; |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 EXPECT_FALSE(ev_metadata->IsEVPolicyOID(ev_oid_data.fake_policy)); | 135 EXPECT_FALSE(ev_metadata->IsEVPolicyOID(ev_oid_data.fake_policy)); |
| 136 EXPECT_FALSE(ev_metadata->HasEVPolicyOID(kFakeFingerprint, | 136 EXPECT_FALSE(ev_metadata->HasEVPolicyOID(kFakeFingerprint, |
| 137 ev_oid_data.fake_policy)); | 137 ev_oid_data.fake_policy)); |
| 138 } | 138 } |
| 139 | 139 |
| 140 #endif // defined(USE_NSS) || defined(OS_WIN) | 140 #endif // defined(USE_NSS) || defined(OS_WIN) |
| 141 | 141 |
| 142 } // namespace | 142 } // namespace |
| 143 | 143 |
| 144 } // namespace net | 144 } // namespace net |
| OLD | NEW |