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

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

Powered by Google App Engine
This is Rietveld 408576698