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

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

Issue 1288193003: Add a function for parsing RFC 5280's "Certificate". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@test_helpers
Patch Set: Wrap comments in .pem files 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 certificate from the perspective of ParseCertificate().
2
3
4
5 -----BEGIN CERTIFICATE-----
6 MBAwBgUAMAIFADACBQADAgCs
7 -----END CERTIFICATE-----
8
9 $ openssl asn1parse -i < [CERTIFICATE]
10 0:d=0 hl=2 l= 16 cons: SEQUENCE
11 2:d=1 hl=2 l= 6 cons: SEQUENCE
12 4:d=2 hl=2 l= 0 prim: NULL
13 6:d=2 hl=2 l= 2 cons: SEQUENCE
14 8:d=3 hl=2 l= 0 prim: NULL
15 10:d=1 hl=2 l= 2 cons: SEQUENCE
16 12:d=2 hl=2 l= 0 prim: NULL
17 14:d=1 hl=2 l= 2 prim: BIT STRING
18
19
20
21 -----BEGIN TBS CERTIFICATE-----
22 MAYFADACBQA=
23 -----END TBS CERTIFICATE-----
24
25 $ openssl asn1parse -i < [TBS CERTIFICATE]
26 0:d=0 hl=2 l= 6 cons: SEQUENCE
27 2:d=1 hl=2 l= 0 prim: NULL
28 4:d=1 hl=2 l= 2 cons: SEQUENCE
29 6:d=2 hl=2 l= 0 prim: NULL
30
31
32
33 -----BEGIN SIGNATURE ALGORITHM-----
34 MAIFAA==
35 -----END SIGNATURE ALGORITHM-----
36
37 $ openssl asn1parse -i < [SIGNATURE ALGORITHM]
38 0:d=0 hl=2 l= 2 cons: SEQUENCE
39 2:d=1 hl=2 l= 0 prim: NULL
40
41
42
43 -----BEGIN SIGNATURE-----
44 rA==
45 -----END SIGNATURE-----
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698