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

Side by Side Diff: net/data/parse_certificate_unittest/tbs_negative_serial_number.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 valid TBSCertificate. However the Serial Number is negative (which
2 strictly speaking is not correct).
3
4
5
6 -----BEGIN TBS CERTIFICATE-----
7 MCigAwIBAgIIiR6QqQAANUAwAwQBATADBAEFMAMEAQgwAwQBCjADBAHz
8 -----END TBS CERTIFICATE-----
9
10 $ openssl asn1parse -i < [TBS CERTIFICATE]
11 0:d=0 hl=2 l= 40 cons: SEQUENCE
12 2:d=1 hl=2 l= 3 cons: cont [ 0 ]
13 4:d=2 hl=2 l= 1 prim: INTEGER :02
14 7:d=1 hl=2 l= 8 prim: INTEGER :-76E16F56FFFFCAC0
15 17:d=1 hl=2 l= 3 cons: SEQUENCE
16 19:d=2 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:01
17 22:d=1 hl=2 l= 3 cons: SEQUENCE
18 24:d=2 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:05
19 27:d=1 hl=2 l= 3 cons: SEQUENCE
20 29:d=2 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:08
21 32:d=1 hl=2 l= 3 cons: SEQUENCE
22 34:d=2 hl=2 l= 1 prim: OCTET STRING :
23
24 37:d=1 hl=2 l= 3 cons: SEQUENCE
25 39:d=2 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:F3
26
27
28
29 -----BEGIN SERIAL NUMBER-----
30 iR6QqQAANUA=
31 -----END SERIAL NUMBER-----
32
33
34
35 -----BEGIN SIGNATURE ALGORITHM-----
36 MAMEAQE=
37 -----END SIGNATURE ALGORITHM-----
38
39 $ openssl asn1parse -i < [SIGNATURE ALGORITHM]
40 0:d=0 hl=2 l= 3 cons: SEQUENCE
41 2:d=1 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:01
42
43
44
45 -----BEGIN ISSUER-----
46 MAMEAQU=
47 -----END ISSUER-----
48
49 $ openssl asn1parse -i < [ISSUER]
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-----
56 MAMEAQg=
57 -----END VALIDITY-----
58
59 $ openssl asn1parse -i < [VALIDITY]
60 0:d=0 hl=2 l= 3 cons: SEQUENCE
61 2:d=1 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:08
62
63
64
65 -----BEGIN SUBJECT-----
66 MAMEAQo=
67 -----END SUBJECT-----
68
69 $ openssl asn1parse -i < [SUBJECT]
70 0:d=0 hl=2 l= 3 cons: SEQUENCE
71 2:d=1 hl=2 l= 1 prim: OCTET STRING :
72
73
74
75 -----BEGIN SPKI-----
76 MAMEAfM=
77 -----END SPKI-----
78
79 $ openssl asn1parse -i < [SPKI]
80 0:d=0 hl=2 l= 3 cons: SEQUENCE
81 2:d=1 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:F3
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698