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

Unified 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: More comment fixes 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 side-by-side diff with in-line comments
Download patch
Index: net/data/parse_certificate_unittest/cert_skeleton.pem
diff --git a/net/data/parse_certificate_unittest/cert_skeleton.pem b/net/data/parse_certificate_unittest/cert_skeleton.pem
new file mode 100644
index 0000000000000000000000000000000000000000..49453de4d1faa7e03a44d7743052c97a8adf89ec
--- /dev/null
+++ b/net/data/parse_certificate_unittest/cert_skeleton.pem
@@ -0,0 +1,45 @@
+This is a valid certificate from the perspective of ParseCertificate().
+
+
+
+-----BEGIN CERTIFICATE-----
+MBAwBgUAMAIFADACBQADAgCs
+-----END CERTIFICATE-----
+
+$ openssl asn1parse -i < [CERTIFICATE]
+ 0:d=0 hl=2 l= 16 cons: SEQUENCE
+ 2:d=1 hl=2 l= 6 cons: SEQUENCE
+ 4:d=2 hl=2 l= 0 prim: NULL
+ 6:d=2 hl=2 l= 2 cons: SEQUENCE
+ 8:d=3 hl=2 l= 0 prim: NULL
+ 10:d=1 hl=2 l= 2 cons: SEQUENCE
+ 12:d=2 hl=2 l= 0 prim: NULL
+ 14:d=1 hl=2 l= 2 prim: BIT STRING
+
+
+
+-----BEGIN TBS CERTIFICATE-----
+MAYFADACBQA=
+-----END TBS CERTIFICATE-----
+
+$ openssl asn1parse -i < [TBS CERTIFICATE]
+ 0:d=0 hl=2 l= 6 cons: SEQUENCE
+ 2:d=1 hl=2 l= 0 prim: NULL
+ 4:d=1 hl=2 l= 2 cons: SEQUENCE
+ 6:d=2 hl=2 l= 0 prim: NULL
+
+
+
+-----BEGIN SIGNATURE ALGORITHM-----
+MAIFAA==
+-----END SIGNATURE ALGORITHM-----
+
+$ openssl asn1parse -i < [SIGNATURE ALGORITHM]
+ 0:d=0 hl=2 l= 2 cons: SEQUENCE
+ 2:d=1 hl=2 l= 0 prim: NULL
+
+
+
+-----BEGIN SIGNATURE-----
+rA==
+-----END SIGNATURE-----

Powered by Google App Engine
This is Rietveld 408576698