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

Side by Side Diff: net/data/parse_certificate_unittest/tbs_v3_all_optionals.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 version 3 TBSCertificate containing all the possible optional fields.
2
3
4
5 -----BEGIN TBS CERTIFICATE-----
6 MDCgAwIBAgIBATADBAEBMAMEAQUwAwQBCDADBAEKMAMEAfOBAgC5ggIAyqMFMAMEAd0=
7 -----END TBS CERTIFICATE-----
8
9 $ openssl asn1parse -i < [TBS CERTIFICATE]
10 0:d=0 hl=2 l= 48 cons: SEQUENCE
11 2:d=1 hl=2 l= 3 cons: cont [ 0 ]
12 4:d=2 hl=2 l= 1 prim: INTEGER :02
13 7:d=1 hl=2 l= 1 prim: INTEGER :01
14 10:d=1 hl=2 l= 3 cons: SEQUENCE
15 12:d=2 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:01
16 15:d=1 hl=2 l= 3 cons: SEQUENCE
17 17:d=2 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:05
18 20:d=1 hl=2 l= 3 cons: SEQUENCE
19 22:d=2 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:08
20 25:d=1 hl=2 l= 3 cons: SEQUENCE
21 27:d=2 hl=2 l= 1 prim: OCTET STRING :
22
23 30:d=1 hl=2 l= 3 cons: SEQUENCE
24 32:d=2 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:F3
25 35:d=1 hl=2 l= 2 prim: cont [ 1 ]
26 39:d=1 hl=2 l= 2 prim: cont [ 2 ]
27 43:d=1 hl=2 l= 5 cons: cont [ 3 ]
28 45:d=2 hl=2 l= 3 cons: SEQUENCE
29 47:d=3 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:DD
30
31
32
33 -----BEGIN SERIAL NUMBER-----
34 AQ==
35 -----END SERIAL NUMBER-----
36
37
38
39 -----BEGIN SIGNATURE ALGORITHM-----
40 MAMEAQE=
41 -----END SIGNATURE ALGORITHM-----
42
43 $ openssl asn1parse -i < [SIGNATURE ALGORITHM]
44 0:d=0 hl=2 l= 3 cons: SEQUENCE
45 2:d=1 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:01
46
47
48
49 -----BEGIN ISSUER-----
50 MAMEAQU=
51 -----END ISSUER-----
52
53 $ openssl asn1parse -i < [ISSUER]
54 0:d=0 hl=2 l= 3 cons: SEQUENCE
55 2:d=1 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:05
56
57
58
59 -----BEGIN VALIDITY-----
60 MAMEAQg=
61 -----END VALIDITY-----
62
63 $ openssl asn1parse -i < [VALIDITY]
64 0:d=0 hl=2 l= 3 cons: SEQUENCE
65 2:d=1 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:08
66
67
68
69 -----BEGIN SUBJECT-----
70 MAMEAQo=
71 -----END SUBJECT-----
72
73 $ openssl asn1parse -i < [SUBJECT]
74 0:d=0 hl=2 l= 3 cons: SEQUENCE
75 2:d=1 hl=2 l= 1 prim: OCTET STRING :
76
77
78
79 -----BEGIN SPKI-----
80 MAMEAfM=
81 -----END SPKI-----
82
83 $ openssl asn1parse -i < [SPKI]
84 0:d=0 hl=2 l= 3 cons: SEQUENCE
85 2:d=1 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:F3
86
87
88
89 -----BEGIN ISSUER UNIQUE ID-----
90 uQ==
91 -----END ISSUER UNIQUE ID-----
92
93
94
95 -----BEGIN SUBJECT UNIQUE ID-----
96 yg==
97 -----END SUBJECT UNIQUE ID-----
98
99
100
101 -----BEGIN EXTENSIONS-----
102 MAMEAd0=
103 -----END EXTENSIONS-----
104
105 $ openssl asn1parse -i < [EXTENSIONS]
106 0:d=0 hl=2 l= 3 cons: SEQUENCE
107 2:d=1 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:DD
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698