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

Unified Diff: net/data/parse_certificate_unittest/tbs_v2_issuer_unique_id.pem

Issue 1285593003: Add parsing code for TBSCertificate's "validity" field. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cert_parsing
Patch Set: rebase 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/tbs_v2_issuer_unique_id.pem
diff --git a/net/data/parse_certificate_unittest/tbs_v2_issuer_unique_id.pem b/net/data/parse_certificate_unittest/tbs_v2_issuer_unique_id.pem
index 4acabd3e0d4f5ca88249248cd480b0407a66a734..c608bb4cc1de3db93e43242977929ddd13388c22 100644
--- a/net/data/parse_certificate_unittest/tbs_v2_issuer_unique_id.pem
+++ b/net/data/parse_certificate_unittest/tbs_v2_issuer_unique_id.pem
@@ -3,11 +3,12 @@ This is a version 2 certificate containing the issuer unique ID field.
-----BEGIN TBS CERTIFICATE-----
-MCWgAwIBAQIBATADBAEBMAMEAQUwAwQBCDADBAEKMAMEAfOBAgC5
+MECgAwIBAQIBATADBAEBMAMEAQUwHhcNMTIxMDE4MDMxMjAwWhcNMTMxMDE4MTQ1OTU5WjADBAG
+DMAMEAfOBAgC5
-----END TBS CERTIFICATE-----
$ openssl asn1parse -i < [TBS CERTIFICATE]
- 0:d=0 hl=2 l= 37 cons: SEQUENCE
+ 0:d=0 hl=2 l= 64 cons: SEQUENCE
2:d=1 hl=2 l= 3 cons: cont [ 0 ]
4:d=2 hl=2 l= 1 prim: INTEGER :01
7:d=1 hl=2 l= 1 prim: INTEGER :01
@@ -15,14 +16,14 @@ $ openssl asn1parse -i < [TBS CERTIFICATE]
12:d=2 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:01
15:d=1 hl=2 l= 3 cons: SEQUENCE
17:d=2 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:05
- 20:d=1 hl=2 l= 3 cons: SEQUENCE
- 22:d=2 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:08
- 25:d=1 hl=2 l= 3 cons: SEQUENCE
- 27:d=2 hl=2 l= 1 prim: OCTET STRING :
-
- 30:d=1 hl=2 l= 3 cons: SEQUENCE
- 32:d=2 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:F3
- 35:d=1 hl=2 l= 2 prim: cont [ 1 ]
+ 20:d=1 hl=2 l= 30 cons: SEQUENCE
+ 22:d=2 hl=2 l= 13 prim: UTCTIME :121018031200Z
+ 37:d=2 hl=2 l= 13 prim: UTCTIME :131018145959Z
+ 52:d=1 hl=2 l= 3 cons: SEQUENCE
+ 54:d=2 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:83
+ 57:d=1 hl=2 l= 3 cons: SEQUENCE
+ 59:d=2 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:F3
+ 62:d=1 hl=2 l= 2 prim: cont [ 1 ]
@@ -52,23 +53,31 @@ $ openssl asn1parse -i < [ISSUER]
------BEGIN VALIDITY-----
-MAMEAQg=
------END VALIDITY-----
+-----BEGIN VALIDITY NOTBEFORE-----
+eWVhcj0yMDEyLCBtb250aD0xMCwgZGF5PTE4LCBob3Vycz0zLCBtaW51dGVzPTEyLCBzZWNvbmR
+zPTA=
+-----END VALIDITY NOTBEFORE-----
-$ openssl asn1parse -i < [VALIDITY]
- 0:d=0 hl=2 l= 3 cons: SEQUENCE
- 2:d=1 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:08
+VALIDITY NOTBEFORE: year=2012, month=10, day=18, hours=3, minutes=12, seconds=0
+
+
+
+-----BEGIN VALIDITY NOTAFTER-----
+eWVhcj0yMDEzLCBtb250aD0xMCwgZGF5PTE4LCBob3Vycz0xNCwgbWludXRlcz01OSwgc2Vjb25
+kcz01OQ==
+-----END VALIDITY NOTAFTER-----
+
+VALIDITY NOTAFTER: year=2013, month=10, day=18, hours=14, minutes=59, seconds=59
-----BEGIN SUBJECT-----
-MAMEAQo=
+MAMEAYM=
-----END SUBJECT-----
$ openssl asn1parse -i < [SUBJECT]
0:d=0 hl=2 l= 3 cons: SEQUENCE
- 2:d=1 hl=2 l= 1 prim: OCTET STRING :
+ 2:d=1 hl=2 l= 1 prim: OCTET STRING [HEX DUMP]:83

Powered by Google App Engine
This is Rietveld 408576698