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

Side by Side Diff: net/test/test_certificate_data.h

Issue 2672083003: Re-enable CertVerifyProcInternalTest.PublicKeyHashes. (Closed)
Patch Set: switch to EXPECT_THAT() Created 3 years, 10 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
« no previous file with comments | « net/cert/cert_verify_result.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef NET_TEST_TEST_CERTIFICATE_DATA_H_ 5 #ifndef NET_TEST_TEST_CERTIFICATE_DATA_H_
6 #define NET_TEST_TEST_CERTIFICATE_DATA_H_ 6 #define NET_TEST_TEST_CERTIFICATE_DATA_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 namespace { 10 namespace {
11 11
12 // This is the SHA1 hash of the SubjectPublicKeyInfo of nist.der. 12 // This is the SHA1 hash of the SubjectPublicKeyInfo of nist.der.
13 static const char kNistSPKIHash[] = 13 static const char kNistSPKIHash[] =
14 "\x15\x60\xde\x65\x4e\x03\x9f\xd0\x08\x82" 14 "\x15\x60\xde\x65\x4e\x03\x9f\xd0\x08\x82"
15 "\xa9\x6a\xc4\x65\x8e\x6f\x92\x06\x84\x35"; 15 "\xa9\x6a\xc4\x65\x8e\x6f\x92\x06\x84\x35";
16 16
17 // kTwitterSPKIs contains the SHA1 hashes of the SPKIs of the twitter-chain.pem
18 // certificate chain, in order.
19 static const char kTwitterSPKIs[3][21] = {
20 "\x26\x9a\x19\xa3\x88\x28\xc1\xdd\x70\x1b"
21 "\xa0\xca\x2c\x98\xdb\xc6\xe1\x4f\x37\x3e",
22 "\x47\x49\xdf\x16\x57\xf4\x6c\x8b\xd2\x8c"
23 "\x79\x1b\x99\xfb\x9f\x28\x81\x2a\x60\xe0",
24 "\xb1\x81\x08\x1a\x19\xa4\xc0\x94\x1f\xfa"
25 "\xe8\x95\x28\xc1\x24\xc9\x9b\x34\xac\xc7",
26 };
27
28 // kTwitterSPKIsSHA256 contains the SHA256 hashes of the SPKIs of the
29 // twitter-chain.pem certificate chain, in order.
30 static const char kTwitterSPKIsSHA256[3][33] = {
31 "\x20\xec\x5d\x0a\xfb\xc6\xc0\xe2\xe1\x95\x56\xc5\x35\x2b\x3c\x60"
32 "\x78\xa6\xed\x95\x55\xc2\xfa\x86\x82\x40\x4f\xdb\x55\x29\xd3\xad",
33 "\x80\xcc\x56\x3a\xb5\xf8\x3c\xc4\x1e\xb0\xaf\x6a\x14\xd6\xd8\x07"
34 "\x18\xc1\x7e\x35\x2f\x96\x49\xff\xbc\xdd\x67\xf8\xbf\x65\x13\x91",
35 "\x25\xb4\x1b\x50\x6e\x49\x30\x95\x28\x23\xa6\xeb\x9f\x1d\x31\xde"
36 "\xf6\x45\xea\x38\xa5\xc6\xc6\xa9\x6d\x71\x95\x7e\x38\x4d\xf0\x58",
37 };
38
39 // Certificates for test data. They're obtained with: 17 // Certificates for test data. They're obtained with:
40 // 18 //
41 // $ openssl s_client -connect [host]:443 -showcerts > /tmp/host.pem < /dev/null 19 // $ openssl s_client -connect [host]:443 -showcerts > /tmp/host.pem < /dev/null
42 // $ openssl x509 -inform PEM -outform DER < /tmp/host.pem > /tmp/host.der 20 // $ openssl x509 -inform PEM -outform DER < /tmp/host.pem > /tmp/host.der
43 // $ xxd -i /tmp/host.der 21 // $ xxd -i /tmp/host.der
44 // 22 //
45 // TODO(wtc): move these certificates to data files in the 23 // TODO(wtc): move these certificates to data files in the
46 // src/net/data/ssl/certificates directory. 24 // src/net/data/ssl/certificates directory.
47 25
48 // The linux compiler is nitty about unused variables. Declaring variables 26 // The linux compiler is nitty about unused variables. Declaring variables
(...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 0x03, 0x55, 0x04, 0x0A, 0x13, 0x25, 0x4D, 0x61, 0x73, 0x73, 0x61, 758 0x03, 0x55, 0x04, 0x0A, 0x13, 0x25, 0x4D, 0x61, 0x73, 0x73, 0x61,
781 0x63, 0x68, 0x75, 0x73, 0x65, 0x74, 0x74, 0x73, 0x20, 0x49, 0x6E, 759 0x63, 0x68, 0x75, 0x73, 0x65, 0x74, 0x74, 0x73, 0x20, 0x49, 0x6E,
782 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x65, 0x20, 0x6F, 0x66, 0x20, 760 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x65, 0x20, 0x6F, 0x66, 0x20,
783 0x54, 0x65, 0x63, 0x68, 0x6E, 0x6F, 0x6C, 0x6F, 0x67, 0x79, 0x31, 761 0x54, 0x65, 0x63, 0x68, 0x6E, 0x6F, 0x6C, 0x6F, 0x67, 0x79, 0x31,
784 0x15, 0x30, 0x13, 0x06, 0x03, 0x55, 0x04, 0x0B, 0x13, 0x0C, 0x43, 762 0x15, 0x30, 0x13, 0x06, 0x03, 0x55, 0x04, 0x0B, 0x13, 0x0C, 0x43,
785 0x6C, 0x69, 0x65, 0x6E, 0x74, 0x20, 0x43, 0x41, 0x20, 0x76, 0x31}; 763 0x6C, 0x69, 0x65, 0x6E, 0x74, 0x20, 0x43, 0x41, 0x20, 0x76, 0x31};
786 764
787 } // namespace 765 } // namespace
788 766
789 #endif // NET_TEST_TEST_CERTIFICATE_DATA_H_ 767 #endif // NET_TEST_TEST_CERTIFICATE_DATA_H_
OLDNEW
« no previous file with comments | « net/cert/cert_verify_result.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698