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

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: rebase onto master 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 ParseTb sCertificate(), however its sub-fields are mainly bogus. This TBSCertificate con tains no optional fields (no issuerUniqueID, subjectUniqueID, extensions)
2
3
4
5 -----BEGIN TBS CERTIFICATE-----
6 MCigAwIBAgIBATADBAEBMAMEAQUwAwQBCDADBAEKMAMEAfOjBTADBAHd
7 -----END TBS CERTIFICATE-----
8
9 $ openssl asn1parse -i < [TBS CERTIFICATE]
10 0:d=0 hl=2 l= 40 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= 5 cons: cont [ 3 ]
26 37:d=2 hl=2 l= 3 cons: SEQUENCE
27 39:d=3 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:DD
28
29
30
31 -----BEGIN SERIAL NUMBER-----
32 AQ==
33 -----END SERIAL NUMBER-----
34
35
36
37 -----BEGIN SIGNATURE ALGORITHM-----
38 MAMEAQE=
39 -----END SIGNATURE ALGORITHM-----
40
41 $ openssl asn1parse -i < [SIGNATURE ALGORITHM]
42 0:d=0 hl=2 l= 3 cons: SEQUENCE
43 2:d=1 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:01
44
45
46
47 -----BEGIN ISSUER-----
48 MAMEAQU=
49 -----END ISSUER-----
50
51 $ openssl asn1parse -i < [ISSUER]
52 0:d=0 hl=2 l= 3 cons: SEQUENCE
53 2:d=1 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:05
54
55
56
57 -----BEGIN VALIDITY-----
58 MAMEAQg=
59 -----END VALIDITY-----
60
61 $ openssl asn1parse -i < [VALIDITY]
62 0:d=0 hl=2 l= 3 cons: SEQUENCE
63 2:d=1 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:08
64
65
66
67 -----BEGIN SUBJECT-----
68 MAMEAQo=
69 -----END SUBJECT-----
70
71 $ openssl asn1parse -i < [SUBJECT]
72 0:d=0 hl=2 l= 3 cons: SEQUENCE
73 2:d=1 hl=2 l= 1 prim: OCTET STRING :
74
75
76
77 -----BEGIN SPKI-----
78 MAMEAfM=
79 -----END SPKI-----
80
81 $ openssl asn1parse -i < [SPKI]
82 0:d=0 hl=2 l= 3 cons: SEQUENCE
83 2:d=1 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:F3
84
85
86
87 -----BEGIN EXTENSIONS-----
88 MAMEAd0=
89 -----END EXTENSIONS-----
90
91 $ openssl asn1parse -i < [EXTENSIONS]
92 0:d=0 hl=2 l= 3 cons: SEQUENCE
93 2:d=1 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:DD
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698