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

Side by Side Diff: net/data/parse_certificate_unittest/tbs_v3_extensions.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: one more comment fix 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 This is a very basic TBSCertificate. It is valid from the perspective of
2 ParseTbsCertificate(), however its sub-fields are mainly bogus. This
3 TBSCertificate contains no optional fields (no issuerUniqueID, subjectUniqueID,
4 extensions)
5
6
7
8 -----BEGIN TBS CERTIFICATE-----
9 MCigAwIBAgIBATADBAEBMAMEAQUwAwQBCDADBAEKMAMEAfOjBTADBAHd
10 -----END TBS CERTIFICATE-----
11
12 $ openssl asn1parse -i < [TBS CERTIFICATE]
13 0:d=0 hl=2 l= 40 cons: SEQUENCE
14 2:d=1 hl=2 l= 3 cons: cont [ 0 ]
15 4:d=2 hl=2 l= 1 prim: INTEGER :02
16 7:d=1 hl=2 l= 1 prim: INTEGER :01
17 10:d=1 hl=2 l= 3 cons: SEQUENCE
18 12:d=2 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:01
19 15:d=1 hl=2 l= 3 cons: SEQUENCE
20 17:d=2 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:05
21 20:d=1 hl=2 l= 3 cons: SEQUENCE
22 22:d=2 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:08
23 25:d=1 hl=2 l= 3 cons: SEQUENCE
24 27:d=2 hl=2 l= 1 prim: OCTET STRING :
25
26 30:d=1 hl=2 l= 3 cons: SEQUENCE
27 32:d=2 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:F3
28 35:d=1 hl=2 l= 5 cons: cont [ 3 ]
29 37:d=2 hl=2 l= 3 cons: SEQUENCE
30 39:d=3 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:DD
31
32
33
34 -----BEGIN SERIAL NUMBER-----
35 AQ==
36 -----END SERIAL NUMBER-----
37
38
39
40 -----BEGIN SIGNATURE ALGORITHM-----
41 MAMEAQE=
42 -----END SIGNATURE ALGORITHM-----
43
44 $ openssl asn1parse -i < [SIGNATURE ALGORITHM]
45 0:d=0 hl=2 l= 3 cons: SEQUENCE
46 2:d=1 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:01
47
48
49
50 -----BEGIN ISSUER-----
51 MAMEAQU=
52 -----END ISSUER-----
53
54 $ openssl asn1parse -i < [ISSUER]
55 0:d=0 hl=2 l= 3 cons: SEQUENCE
56 2:d=1 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:05
57
58
59
60 -----BEGIN VALIDITY-----
61 MAMEAQg=
62 -----END VALIDITY-----
63
64 $ openssl asn1parse -i < [VALIDITY]
65 0:d=0 hl=2 l= 3 cons: SEQUENCE
66 2:d=1 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:08
67
68
69
70 -----BEGIN SUBJECT-----
71 MAMEAQo=
72 -----END SUBJECT-----
73
74 $ openssl asn1parse -i < [SUBJECT]
75 0:d=0 hl=2 l= 3 cons: SEQUENCE
76 2:d=1 hl=2 l= 1 prim: OCTET STRING :
77
78
79
80 -----BEGIN SPKI-----
81 MAMEAfM=
82 -----END SPKI-----
83
84 $ openssl asn1parse -i < [SPKI]
85 0:d=0 hl=2 l= 3 cons: SEQUENCE
86 2:d=1 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:F3
87
88
89
90 -----BEGIN EXTENSIONS-----
91 MAMEAd0=
92 -----END EXTENSIONS-----
93
94 $ openssl asn1parse -i < [EXTENSIONS]
95 0:d=0 hl=2 l= 3 cons: SEQUENCE
96 2:d=1 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:DD
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698