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

Side by Side Diff: net/data/parse_certificate_unittest/serial_number_21_octets_leading_0.pem

Issue 1279963003: Add a function for parsing RFC 5280's "TBSCertificate". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cert_mapper
Patch Set: Fully move expectations to test data Created 5 years, 4 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
OLDNEW
(Empty)
1 $ openssl x509 -inform DER -text -noout < [CERTIFICATE]
2 Certificate:
3 Data:
4 Version: 3 (0x2)
5 Serial Number:
6 d8:c3:7e:4d:87:f9:c8:c8:2b:af:26:ef:53:50:1d:f1:fc:f3:a5:20
7 Signature Algorithm: sha1WithRSAEncryption
8 Issuer: C=IT, ST=IT, O=Postecom S.p.A., OU=Servizi di Certificazione, CN =Postecom CS3
9 Validity
10 Not Before: Apr 17 14:34:23 2012 GMT
11 Not After : Apr 17 14:34:23 2013 GMT
12 Subject: C=IT, O=Poste Italiane S.p.A., OU=Postecom S.p.A., CN=mail.unir oma3.it
13 Subject Public Key Info:
14 Public Key Algorithm: rsaEncryption
15 Public-Key: (1024 bit)
16 Modulus:
17 00:b4:62:c0:3a:48:45:cb:6a:44:5f:31:15:2e:4f:
18 50:40:a4:6b:1f:f3:9c:69:e3:ad:d9:b6:0d:bf:cf:
19 2e:09:a4:c9:94:a9:de:0b:03:30:a2:37:be:88:81:
20 7f:fe:1b:17:9b:81:6b:0c:f5:f3:a3:f2:50:7c:cc:
21 ee:6b:95:5e:98:6a:c0:03:bb:62:81:12:29:fb:ac:
22 00:29:92:87:db:8c:5f:f9:eb:5b:29:f6:b4:35:4a:
23 c3:a0:0c:83:38:b1:7d:76:f8:67:e9:db:15:f9:f4:
24 16:03:61:d3:3e:e8:8c:0b:54:2e:fd:d4:84:3c:04:
25 fe:8a:d2:7a:10:6f:59:aa:1f
26 Exponent: 65537 (0x10001)
27 X509v3 extensions:
28 X509v3 Basic Constraints:
29 CA:FALSE
30 X509v3 Certificate Policies:
31 Policy: 1.3.76.11.1.1.4.1
32 CPS: http://postecert.poste.it/manualioperativi/
33
34 X509v3 Key Usage: critical
35 Digital Signature, Key Encipherment, Data Encipherment, Key Agre ement
36 X509v3 Extended Key Usage:
37 TLS Web Server Authentication, TLS Web Client Authentication
38 X509v3 Authority Key Identifier:
39 DirName:/C=IE/O=Baltimore/OU=CyberTrust/CN=Baltimore CyberTrust Root
40 serial:07:27:52:62
41
42 X509v3 CRL Distribution Points:
43
44 Full Name:
45 URI:http://postecert.poste.it/postecomcs3/crl.crl
46
47 Signature Algorithm: sha1WithRSAEncryption
48 74:40:d4:35:ea:05:12:1f:b5:e7:2f:d8:2b:00:30:4c:32:2b:
49 a4:b0:35:55:74:cb:c0:03:56:ad:27:2c:5e:46:85:0a:93:4f:
50 3f:1e:93:d9:a6:de:3b:f5:54:41:60:6f:3a:81:99:48:96:e4:
51 52:b9:f7:39:90:7e:c7:b6:2f:4f:9b:bb:e6:e9:58:d1:25:4e:
52 0a:e3:3f:bb:ff:b1:7b:a1:d3:1e:86:29:62:8d:61:48:1b:10:
53 eb:22:a7:d2:05:8d:f9:a2:7e:d2:c5:1c:c3:2e:b8:b3:97:49:
54 bd:b9:f1:4c:1f:d6:d9:ca:71:5d:5b:85:66:3e:5f:25:00:ec:
55 af:50:48:35:a1:59:0d:62:2c:e0:a0:b2:b2:cb:d6:9b:7b:01:
56 5b:83:ee:f0:48:aa:6d:b6:10:37:96:db:56:aa:d8:4f:9e:e5:
57 2a:68:fb:8b:2d:8f:0e:c6:6a:88:2f:90:a6:f5:b2:bb:e0:be:
58 05:3e:f3:22:35:cc:0b:e5:e3:53:76:7d:fb:f8:7d:29:2c:3b:
59 f8:b6:75:44:c6:b1:8c:c4:24:81:14:86:8c:c4:dd:ff:a5:21:
60 d6:5a:ce:3a:be:1b:c1:94:ea:f7:67:10:8d:db:d1:47:ce:86:
61 10:7e:be:db:54:87:c2:67:8c:0e:aa:dd:87:9f:3d:12:dc:40:
62 32:68:f9:f4
63
64
65 $ openssl asn1parse -i -inform DER < [CERTIFICATE]
66 0:d=0 hl=4 l=1054 cons: SEQUENCE
67 4:d=1 hl=4 l= 774 cons: SEQUENCE
68 8:d=2 hl=2 l= 3 cons: cont [ 0 ]
69 10:d=3 hl=2 l= 1 prim: INTEGER :02
70 13:d=2 hl=2 l= 21 prim: INTEGER :D8C37E4D87F9C8C82BAF26EF53501D F1FCF3A520
71 36:d=2 hl=2 l= 13 cons: SEQUENCE
72 38:d=3 hl=2 l= 9 prim: OBJECT :sha1WithRSAEncryption
73 49:d=3 hl=2 l= 0 prim: NULL
74 51:d=2 hl=2 l= 111 cons: SEQUENCE
75 53:d=3 hl=2 l= 11 cons: SET
76 55:d=4 hl=2 l= 9 cons: SEQUENCE
77 57:d=5 hl=2 l= 3 prim: OBJECT :countryName
78 62:d=5 hl=2 l= 2 prim: PRINTABLESTRING :IT
79 66:d=3 hl=2 l= 11 cons: SET
80 68:d=4 hl=2 l= 9 cons: SEQUENCE
81 70:d=5 hl=2 l= 3 prim: OBJECT :stateOrProvinceName
82 75:d=5 hl=2 l= 2 prim: UTF8STRING :IT
83 79:d=3 hl=2 l= 24 cons: SET
84 81:d=4 hl=2 l= 22 cons: SEQUENCE
85 83:d=5 hl=2 l= 3 prim: OBJECT :organizationName
86 88:d=5 hl=2 l= 15 prim: UTF8STRING :Postecom S.p.A.
87 105:d=3 hl=2 l= 34 cons: SET
88 107:d=4 hl=2 l= 32 cons: SEQUENCE
89 109:d=5 hl=2 l= 3 prim: OBJECT :organizationalUnitName
90 114:d=5 hl=2 l= 25 prim: UTF8STRING :Servizi di Certificazione
91 141:d=3 hl=2 l= 21 cons: SET
92 143:d=4 hl=2 l= 19 cons: SEQUENCE
93 145:d=5 hl=2 l= 3 prim: OBJECT :commonName
94 150:d=5 hl=2 l= 12 prim: UTF8STRING :Postecom CS3
95 164:d=2 hl=2 l= 30 cons: SEQUENCE
96 166:d=3 hl=2 l= 13 prim: UTCTIME :120417143423Z
97 181:d=3 hl=2 l= 13 prim: UTCTIME :130417143423Z
98 196:d=2 hl=2 l= 98 cons: SEQUENCE
99 198:d=3 hl=2 l= 11 cons: SET
100 200:d=4 hl=2 l= 9 cons: SEQUENCE
101 202:d=5 hl=2 l= 3 prim: OBJECT :countryName
102 207:d=5 hl=2 l= 2 prim: PRINTABLESTRING :IT
103 211:d=3 hl=2 l= 30 cons: SET
104 213:d=4 hl=2 l= 28 cons: SEQUENCE
105 215:d=5 hl=2 l= 3 prim: OBJECT :organizationName
106 220:d=5 hl=2 l= 21 prim: UTF8STRING :Poste Italiane S.p.A.
107 243:d=3 hl=2 l= 24 cons: SET
108 245:d=4 hl=2 l= 22 cons: SEQUENCE
109 247:d=5 hl=2 l= 3 prim: OBJECT :organizationalUnitName
110 252:d=5 hl=2 l= 15 prim: UTF8STRING :Postecom S.p.A.
111 269:d=3 hl=2 l= 25 cons: SET
112 271:d=4 hl=2 l= 23 cons: SEQUENCE
113 273:d=5 hl=2 l= 3 prim: OBJECT :commonName
114 278:d=5 hl=2 l= 16 prim: UTF8STRING :mail.uniroma3.it
115 296:d=2 hl=3 l= 159 cons: SEQUENCE
116 299:d=3 hl=2 l= 13 cons: SEQUENCE
117 301:d=4 hl=2 l= 9 prim: OBJECT :rsaEncryption
118 312:d=4 hl=2 l= 0 prim: NULL
119 314:d=3 hl=3 l= 141 prim: BIT STRING
120 458:d=2 hl=4 l= 320 cons: cont [ 3 ]
121 462:d=3 hl=4 l= 316 cons: SEQUENCE
122 466:d=4 hl=2 l= 9 cons: SEQUENCE
123 468:d=5 hl=2 l= 3 prim: OBJECT :X509v3 Basic Constraints
124 473:d=5 hl=2 l= 2 prim: OCTET STRING [HEX DUMP]:3000
125 477:d=4 hl=2 l= 79 cons: SEQUENCE
126 479:d=5 hl=2 l= 3 prim: OBJECT :X509v3 Certificate Policies
127 484:d=5 hl=2 l= 72 prim: OCTET STRING [HEX DUMP]:3046304406072B4C0 B010104013039303706082B06010505070201162B687474703A2F2F706F737465636572742E706F7 374652E69742F6D616E75616C696F70657261746976692F
128 558:d=4 hl=2 l= 14 cons: SEQUENCE
129 560:d=5 hl=2 l= 3 prim: OBJECT :X509v3 Key Usage
130 565:d=5 hl=2 l= 1 prim: BOOLEAN :255
131 568:d=5 hl=2 l= 4 prim: OCTET STRING [HEX DUMP]:030203B8
132 574:d=4 hl=2 l= 29 cons: SEQUENCE
133 576:d=5 hl=2 l= 3 prim: OBJECT :X509v3 Extended Key Usage
134 581:d=5 hl=2 l= 22 prim: OCTET STRING [HEX DUMP]:301406082B0601050 507030106082B06010505070302
135 605:d=4 hl=2 l= 111 cons: SEQUENCE
136 607:d=5 hl=2 l= 3 prim: OBJECT :X509v3 Authority Key Identi fier
137 612:d=5 hl=2 l= 104 prim: OCTET STRING [HEX DUMP]:3066A15EA45C305A3 10B300906035504061302494531123010060355040A130942616C74696D6F7265311330110603550 40B130A43796265725472757374312230200603550403131942616C74696D6F72652043796265725 47275737420526F6F74820407275262
138 718:d=4 hl=2 l= 62 cons: SEQUENCE
139 720:d=5 hl=2 l= 3 prim: OBJECT :X509v3 CRL Distribution Poi nts
140 725:d=5 hl=2 l= 55 prim: OCTET STRING [HEX DUMP]:30353033A031A02F8 62D687474703A2F2F706F737465636572742E706F7374652E69742F706F737465636F6D6373332F6 3726C2E63726C
141 782:d=1 hl=2 l= 13 cons: SEQUENCE
142 784:d=2 hl=2 l= 9 prim: OBJECT :sha1WithRSAEncryption
143 795:d=2 hl=2 l= 0 prim: NULL
144 797:d=1 hl=4 l= 257 prim: BIT STRING
145 -----BEGIN CERTIFICATE-----
146 MIIEHjCCAwagAwIBAgIVANjDfk2H+cjIK68m71NQHfH886UgMA0GCSqGSIb3DQEBBQUAMG8xCzA
147 JBgNVBAYTAklUMQswCQYDVQQIDAJJVDEYMBYGA1UECgwPUG9zdGVjb20gUy5wLkEuM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grjP7v/sXuh0x6GKWKNYUgbEOsip9IFjfmi
162 ftLFHMMuuLOXSb258Uwf1tnKcV1bhWY+XyUA7K9QSDWhWQ1iLOCgsrLL1pt7AVuD7vBIqm22EDe
163 W21aq2E+e5Spo+4stjw7GaogvkKb1srvgvgU+8yI1zAvl41N2ffv4fSksO/i2dUTGsYzEJIEUho
164 zE3f+lIdZazjq+G8GU6vdnEI3b0UfOhhB+vttUh8JnjA6q3YefPRLcQDJo+fQ=
165 -----END CERTIFICATE-----
166
167
168 -----BEGIN SIGNATURE-----
169 dEDUNeoFEh+15y/YKwAwTDIrpLA1VXTLwANWrScsXkaFCpNPPx6T2abeO/VUQWBvOoGZSJbkUrn
170 3OZB+x7YvT5u75ulY0SVOCuM/u/+xe6HTHoYpYo1hSBsQ6yKn0gWN+aJ+0sUcwy64s5dJvbnxTB
171 /W2cpxXVuFZj5fJQDsr1BINaFZDWIs4KCyssvWm3sBW4Pu8EiqbbYQN5bbVqrYT57lKmj7iy2PD
172 sZqiC+QpvWyu+C+BT7zIjXMC+XjU3Z9+/h9KSw7+LZ1RMaxjMQkgRSGjMTd/6Uh1lrOOr4bwZTq
173 92cQjdvRR86GEH6+21SHwmeMDqrdh589EtxAMmj59A==
174 -----END SIGNATURE-----
175
176 $ openssl asn1parse -i -inform DER < [SIGNATURE ALGORITHM]
177 0:d=0 hl=2 l= 13 cons: SEQUENCE
178 2:d=1 hl=2 l= 9 prim: OBJECT :sha1WithRSAEncryption
179 13:d=1 hl=2 l= 0 prim: NULL
180 -----BEGIN SIGNATURE ALGORITHM-----
181 MA0GCSqGSIb3DQEBBQUA
182 -----END SIGNATURE ALGORITHM-----
183
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698