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

Unified Diff: net/data/cert_issuer_source_static_unittest/generate-certs.py

Issue 2535733003: pki library: Add CertIssuerSourceNSS that retrieves intermediate certs from NSS. (Closed)
Patch Set: review changes Created 4 years, 1 month 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/cert_issuer_source_static_unittest/generate-certs.py
diff --git a/net/data/cert_issuer_source_static_unittest/generate-certs.py b/net/data/cert_issuer_source_static_unittest/generate-certs.py
index e15fd912f2f06263431df441a9eaf6ce1d4f56fb..7eac10ee4f4a7abdabdd00803df44770e1d65d17 100755
--- a/net/data/cert_issuer_source_static_unittest/generate-certs.py
+++ b/net/data/cert_issuer_source_static_unittest/generate-certs.py
@@ -5,26 +5,30 @@
"""Certificates for testing issuer lookup.
- Root
- /| |
- / | |
- / | |
- / | |
- / | |
- v v v
- I1_1 i1_2 I2
- | | |
- | | |
- | | |
- | | |
- v v v
- C1 C2 D
+ Root
+ /| | |\\
+ / | | | \\
+ / | | | \\
+ / | | | \\
+ / | | | \\
+ v v v v v
+ I1_1 i1_2 I2 I3_1 I3_2
+ | | | | |
+ | | | | |
+ | | | | |
+ | | | | |
+ v v v | |
+ C1 C2 D E1 E2
I1 (i1_1.pem) and i1 (i1_2.pem) have subjects that are equal after
normalization.
+I3_1 and I3_2 have subjects that are exactly equal.
+
C1 and C2 should (attempt to) chain up through both I1 and i1, since I1 and i1
have the same the name (after normalization).
+
+E1 and E3 should (attempt to) chain up through both I3 intermediates.
"""
import os
@@ -59,6 +63,11 @@ write_cert_to_file(i1_2, 'i1_2.pem')
i2 = common.create_intermediate_certificate('I2', root)
write_cert_to_file(i2, 'i2.pem')
+# Two intermediates with exactly the same name.
+i3_1 = common.create_intermediate_certificate('I3', root)
+write_cert_to_file(i3_1, 'i3_1.pem')
+i3_2 = common.create_intermediate_certificate('I3', root)
+write_cert_to_file(i3_2, 'i3_2.pem')
# target certs
@@ -71,4 +80,9 @@ write_cert_to_file(c2, 'c2.pem')
d = common.create_end_entity_certificate('D', i2)
write_cert_to_file(d, 'd.pem')
+e1 = common.create_end_entity_certificate('E1', i3_1)
+write_cert_to_file(e1, 'e1.pem')
+
+e2 = common.create_end_entity_certificate('E2', i3_2)
+write_cert_to_file(e2, 'e2.pem')
« no previous file with comments | « net/data/cert_issuer_source_static_unittest/e2.pem ('k') | net/data/cert_issuer_source_static_unittest/i1_1.pem » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698