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

Side by Side Diff: net/data/parse_certificate_unittest/tbs_negative_serial_number.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 valid TBSCertificate. However the Serial Number is negative (which 1 This is a valid TBSCertificate. However the Serial Number is negative (which
2 strictly speaking is not correct). 2 strictly speaking is not correct).
3 3
4 4
5
6 -----BEGIN TBS CERTIFICATE-----
7 MEOgAwIBAgIIiR6QqQAANUAwAwQBATADBAEFMB4XDTEyMTAxODAzMTIwMFoXDTEzMTAxODE0NTk
8 1OVowAwQBgzADBAHz
9 -----END TBS CERTIFICATE-----
10
11 $ openssl asn1parse -i < [TBS CERTIFICATE] 5 $ openssl asn1parse -i < [TBS CERTIFICATE]
12 0:d=0 hl=2 l= 67 cons: SEQUENCE 6 0:d=0 hl=2 l= 67 cons: SEQUENCE
13 2:d=1 hl=2 l= 3 cons: cont [ 0 ] 7 2:d=1 hl=2 l= 3 cons: cont [ 0 ]
14 4:d=2 hl=2 l= 1 prim: INTEGER :02 8 4:d=2 hl=2 l= 1 prim: INTEGER :02
15 7:d=1 hl=2 l= 8 prim: INTEGER :-76E16F56FFFFCAC0 9 7:d=1 hl=2 l= 8 prim: INTEGER :-76E16F56FFFFCAC0
16 17:d=1 hl=2 l= 3 cons: SEQUENCE 10 17:d=1 hl=2 l= 3 cons: SEQUENCE
17 19:d=2 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:01 11 19:d=2 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:01
18 22:d=1 hl=2 l= 3 cons: SEQUENCE 12 22:d=1 hl=2 l= 3 cons: SEQUENCE
19 24:d=2 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:05 13 24:d=2 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:05
20 27:d=1 hl=2 l= 30 cons: SEQUENCE 14 27:d=1 hl=2 l= 30 cons: SEQUENCE
21 29:d=2 hl=2 l= 13 prim: UTCTIME :121018031200Z 15 29:d=2 hl=2 l= 13 prim: UTCTIME :121018031200Z
22 44:d=2 hl=2 l= 13 prim: UTCTIME :131018145959Z 16 44:d=2 hl=2 l= 13 prim: UTCTIME :131018145959Z
23 59:d=1 hl=2 l= 3 cons: SEQUENCE 17 59:d=1 hl=2 l= 3 cons: SEQUENCE
24 61:d=2 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:83 18 61:d=2 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:83
25 64:d=1 hl=2 l= 3 cons: SEQUENCE 19 64:d=1 hl=2 l= 3 cons: SEQUENCE
26 66:d=2 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:F3 20 66:d=2 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:F3
27 21 -----BEGIN TBS CERTIFICATE-----
28 22 MEOgAwIBAgIIiR6QqQAANUAwAwQBATADBAEFMB4XDTEyMTAxODAzMTIwMFoXDTEzMTAxODE0NTk
23 1OVowAwQBgzADBAHz
24 -----END TBS CERTIFICATE-----
29 25
30 -----BEGIN SERIAL NUMBER----- 26 -----BEGIN SERIAL NUMBER-----
31 iR6QqQAANUA= 27 iR6QqQAANUA=
32 -----END SERIAL NUMBER----- 28 -----END SERIAL NUMBER-----
33 29
34 30 $ openssl asn1parse -i < [SIGNATURE ALGORITHM]
35 31 0:d=0 hl=2 l= 3 cons: SEQUENCE
32 2:d=1 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:01
36 -----BEGIN SIGNATURE ALGORITHM----- 33 -----BEGIN SIGNATURE ALGORITHM-----
37 MAMEAQE= 34 MAMEAQE=
38 -----END SIGNATURE ALGORITHM----- 35 -----END SIGNATURE ALGORITHM-----
39 36
40 $ openssl asn1parse -i < [SIGNATURE ALGORITHM] 37 $ openssl asn1parse -i < [ISSUER]
41 0:d=0 hl=2 l= 3 cons: SEQUENCE 38 0:d=0 hl=2 l= 3 cons: SEQUENCE
42 2:d=1 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:01 39 2:d=1 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:05
43
44
45
46 -----BEGIN ISSUER----- 40 -----BEGIN ISSUER-----
47 MAMEAQU= 41 MAMEAQU=
48 -----END ISSUER----- 42 -----END ISSUER-----
49 43
50 $ openssl asn1parse -i < [ISSUER] 44 VALIDITY NOTBEFORE: year=2012, month=10, day=18, hours=3, minutes=12, seconds=0
51 0:d=0 hl=2 l= 3 cons: SEQUENCE
52 2:d=1 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:05
53
54
55
56 -----BEGIN VALIDITY NOTBEFORE----- 45 -----BEGIN VALIDITY NOTBEFORE-----
57 eWVhcj0yMDEyLCBtb250aD0xMCwgZGF5PTE4LCBob3Vycz0zLCBtaW51dGVzPTEyLCBzZWNvbmR 46 eWVhcj0yMDEyLCBtb250aD0xMCwgZGF5PTE4LCBob3Vycz0zLCBtaW51dGVzPTEyLCBzZWNvbmR
58 zPTA= 47 zPTA=
59 -----END VALIDITY NOTBEFORE----- 48 -----END VALIDITY NOTBEFORE-----
60 49
61 VALIDITY NOTBEFORE: year=2012, month=10, day=18, hours=3, minutes=12, seconds=0 50 VALIDITY NOTAFTER: year=2013, month=10, day=18, hours=14, minutes=59, seconds=59
62
63
64
65 -----BEGIN VALIDITY NOTAFTER----- 51 -----BEGIN VALIDITY NOTAFTER-----
66 eWVhcj0yMDEzLCBtb250aD0xMCwgZGF5PTE4LCBob3Vycz0xNCwgbWludXRlcz01OSwgc2Vjb25 52 eWVhcj0yMDEzLCBtb250aD0xMCwgZGF5PTE4LCBob3Vycz0xNCwgbWludXRlcz01OSwgc2Vjb25
67 kcz01OQ== 53 kcz01OQ==
68 -----END VALIDITY NOTAFTER----- 54 -----END VALIDITY NOTAFTER-----
69 55
70 VALIDITY NOTAFTER: year=2013, month=10, day=18, hours=14, minutes=59, seconds=59 56 $ openssl asn1parse -i < [SUBJECT]
71 57 0:d=0 hl=2 l= 3 cons: SEQUENCE
72 58 2:d=1 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:83
73
74 -----BEGIN SUBJECT----- 59 -----BEGIN SUBJECT-----
75 MAMEAYM= 60 MAMEAYM=
76 -----END SUBJECT----- 61 -----END SUBJECT-----
77 62
78 $ openssl asn1parse -i < [SUBJECT] 63 $ openssl asn1parse -i < [SPKI]
79 0:d=0 hl=2 l= 3 cons: SEQUENCE 64 0:d=0 hl=2 l= 3 cons: SEQUENCE
80 2:d=1 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:83 65 2:d=1 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:F3
81
82
83
84 -----BEGIN SPKI----- 66 -----BEGIN SPKI-----
85 MAMEAfM= 67 MAMEAfM=
86 -----END SPKI----- 68 -----END SPKI-----
87
88 $ openssl asn1parse -i < [SPKI]
89 0:d=0 hl=2 l= 3 cons: SEQUENCE
90 2:d=1 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:F3
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698