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

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

Issue 1658693006: Normalize the PEM format used in some certificate test data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
1 This is a version 2 certificate with none of the optional fields. 1 This is a version 2 certificate with none of the optional fields.
2 2
3 3
4
5 -----BEGIN TBS CERTIFICATE-----
6 MDygAwIBAQIBATADBAEBMAMEAQUwHhcNMTIxMDE4MDMxMjAwWhcNMTMxMDE4MTQ1OTU5WjADBAG
7 DMAMEAfM=
8 -----END TBS CERTIFICATE-----
9
10 $ openssl asn1parse -i < [TBS CERTIFICATE] 4 $ openssl asn1parse -i < [TBS CERTIFICATE]
11 0:d=0 hl=2 l= 60 cons: SEQUENCE 5 0:d=0 hl=2 l= 60 cons: SEQUENCE
12 2:d=1 hl=2 l= 3 cons: cont [ 0 ] 6 2:d=1 hl=2 l= 3 cons: cont [ 0 ]
13 4:d=2 hl=2 l= 1 prim: INTEGER :01 7 4:d=2 hl=2 l= 1 prim: INTEGER :01
14 7:d=1 hl=2 l= 1 prim: INTEGER :01 8 7:d=1 hl=2 l= 1 prim: INTEGER :01
15 10:d=1 hl=2 l= 3 cons: SEQUENCE 9 10:d=1 hl=2 l= 3 cons: SEQUENCE
16 12:d=2 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:01 10 12:d=2 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:01
17 15:d=1 hl=2 l= 3 cons: SEQUENCE 11 15:d=1 hl=2 l= 3 cons: SEQUENCE
18 17:d=2 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:05 12 17:d=2 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:05
19 20:d=1 hl=2 l= 30 cons: SEQUENCE 13 20:d=1 hl=2 l= 30 cons: SEQUENCE
20 22:d=2 hl=2 l= 13 prim: UTCTIME :121018031200Z 14 22:d=2 hl=2 l= 13 prim: UTCTIME :121018031200Z
21 37:d=2 hl=2 l= 13 prim: UTCTIME :131018145959Z 15 37:d=2 hl=2 l= 13 prim: UTCTIME :131018145959Z
22 52:d=1 hl=2 l= 3 cons: SEQUENCE 16 52:d=1 hl=2 l= 3 cons: SEQUENCE
23 54:d=2 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:83 17 54:d=2 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:83
24 57:d=1 hl=2 l= 3 cons: SEQUENCE 18 57:d=1 hl=2 l= 3 cons: SEQUENCE
25 59:d=2 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:F3 19 59:d=2 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:F3
26 20 -----BEGIN TBS CERTIFICATE-----
27 21 MDygAwIBAQIBATADBAEBMAMEAQUwHhcNMTIxMDE4MDMxMjAwWhcNMTMxMDE4MTQ1OTU5WjADBAG
22 DMAMEAfM=
23 -----END TBS CERTIFICATE-----
28 24
29 -----BEGIN SERIAL NUMBER----- 25 -----BEGIN SERIAL NUMBER-----
30 AQ== 26 AQ==
31 -----END SERIAL NUMBER----- 27 -----END SERIAL NUMBER-----
32 28
33 29 $ openssl asn1parse -i < [SIGNATURE ALGORITHM]
34 30 0:d=0 hl=2 l= 3 cons: SEQUENCE
31 2:d=1 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:01
35 -----BEGIN SIGNATURE ALGORITHM----- 32 -----BEGIN SIGNATURE ALGORITHM-----
36 MAMEAQE= 33 MAMEAQE=
37 -----END SIGNATURE ALGORITHM----- 34 -----END SIGNATURE ALGORITHM-----
38 35
39 $ openssl asn1parse -i < [SIGNATURE ALGORITHM] 36 $ openssl asn1parse -i < [ISSUER]
40 0:d=0 hl=2 l= 3 cons: SEQUENCE 37 0:d=0 hl=2 l= 3 cons: SEQUENCE
41 2:d=1 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:01 38 2:d=1 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:05
42
43
44
45 -----BEGIN ISSUER----- 39 -----BEGIN ISSUER-----
46 MAMEAQU= 40 MAMEAQU=
47 -----END ISSUER----- 41 -----END ISSUER-----
48 42
49 $ openssl asn1parse -i < [ISSUER] 43 VALIDITY NOTBEFORE: year=2012, month=10, day=18, hours=3, minutes=12, seconds=0
50 0:d=0 hl=2 l= 3 cons: SEQUENCE
51 2:d=1 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:05
52
53
54
55 -----BEGIN VALIDITY NOTBEFORE----- 44 -----BEGIN VALIDITY NOTBEFORE-----
56 eWVhcj0yMDEyLCBtb250aD0xMCwgZGF5PTE4LCBob3Vycz0zLCBtaW51dGVzPTEyLCBzZWNvbmR 45 eWVhcj0yMDEyLCBtb250aD0xMCwgZGF5PTE4LCBob3Vycz0zLCBtaW51dGVzPTEyLCBzZWNvbmR
57 zPTA= 46 zPTA=
58 -----END VALIDITY NOTBEFORE----- 47 -----END VALIDITY NOTBEFORE-----
59 48
60 VALIDITY NOTBEFORE: year=2012, month=10, day=18, hours=3, minutes=12, seconds=0 49 VALIDITY NOTAFTER: year=2013, month=10, day=18, hours=14, minutes=59, seconds=59
61
62
63
64 -----BEGIN VALIDITY NOTAFTER----- 50 -----BEGIN VALIDITY NOTAFTER-----
65 eWVhcj0yMDEzLCBtb250aD0xMCwgZGF5PTE4LCBob3Vycz0xNCwgbWludXRlcz01OSwgc2Vjb25 51 eWVhcj0yMDEzLCBtb250aD0xMCwgZGF5PTE4LCBob3Vycz0xNCwgbWludXRlcz01OSwgc2Vjb25
66 kcz01OQ== 52 kcz01OQ==
67 -----END VALIDITY NOTAFTER----- 53 -----END VALIDITY NOTAFTER-----
68 54
69 VALIDITY NOTAFTER: year=2013, month=10, day=18, hours=14, minutes=59, seconds=59 55 $ openssl asn1parse -i < [SUBJECT]
70 56 0:d=0 hl=2 l= 3 cons: SEQUENCE
71 57 2:d=1 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:83
72
73 -----BEGIN SUBJECT----- 58 -----BEGIN SUBJECT-----
74 MAMEAYM= 59 MAMEAYM=
75 -----END SUBJECT----- 60 -----END SUBJECT-----
76 61
77 $ openssl asn1parse -i < [SUBJECT] 62 $ openssl asn1parse -i < [SPKI]
78 0:d=0 hl=2 l= 3 cons: SEQUENCE 63 0:d=0 hl=2 l= 3 cons: SEQUENCE
79 2:d=1 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:83 64 2:d=1 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:F3
80
81
82
83 -----BEGIN SPKI----- 65 -----BEGIN SPKI-----
84 MAMEAfM= 66 MAMEAfM=
85 -----END SPKI----- 67 -----END SPKI-----
86
87 $ openssl asn1parse -i < [SPKI]
88 0:d=0 hl=2 l= 3 cons: SEQUENCE
89 2:d=1 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:F3
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698