Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Side by Side Diff: net/cert/ev_root_ca_metadata_unittest.cc

Issue 24616002: Clean up a few unused globals. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/cert/ev_root_ca_metadata.h" 5 #include "net/cert/ev_root_ca_metadata.h"
6 6
7 #include "net/cert/x509_cert_types.h" 7 #include "net/cert/x509_cert_types.h"
8 #include "net/test/cert_test_util.h" 8 #include "net/test/cert_test_util.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 #if defined(USE_NSS) || defined(OS_WIN)
20 static const char kThawtePolicy[] = "2.16.840.1.113733.1.7.48.1"; 20 const char kVerisignPolicy[] = "2.16.840.1.113733.1.7.23.6";
21 static const char kFakePolicy[] = "2.16.840.1.42"; 21 const char kThawtePolicy[] = "2.16.840.1.113733.1.7.48.1";
22 static const SHA1HashValue kVerisignFingerprint = 22 const char kFakePolicy[] = "2.16.840.1.42";
23 const SHA1HashValue kVerisignFingerprint =
23 { { 0x74, 0x2c, 0x31, 0x92, 0xe6, 0x07, 0xe4, 0x24, 0xeb, 0x45, 24 { { 0x74, 0x2c, 0x31, 0x92, 0xe6, 0x07, 0xe4, 0x24, 0xeb, 0x45,
24 0x49, 0x54, 0x2b, 0xe1, 0xbb, 0xc5, 0x3e, 0x61, 0x74, 0xe2 } }; 25 0x49, 0x54, 0x2b, 0xe1, 0xbb, 0xc5, 0x3e, 0x61, 0x74, 0xe2 } };
25 static const SHA1HashValue kFakeFingerprint = 26 const SHA1HashValue kFakeFingerprint =
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 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99 } };
28 29
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;
36 EVRootCAMetadata::PolicyOID thawte_policy; 36 EVRootCAMetadata::PolicyOID thawte_policy;
37 EVRootCAMetadata::PolicyOID fake_policy; 37 EVRootCAMetadata::PolicyOID fake_policy;
38 }; 38 };
39 39
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698