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

Side by Side Diff: net/data/parse_certificate_unittest/tbs_v3_no_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 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 MCGgAwIBAgIBATADBAEBMAMEAQUwAwQBCDADBAEKMAMEAfM=
10 -----END TBS CERTIFICATE-----
11
12 $ openssl asn1parse -i < [TBS CERTIFICATE]
13 0:d=0 hl=2 l= 33 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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698