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

Unified Diff: net/data/verify_certificate_chain_unittest/expired-unconstrained-root/generate-chains.py

Issue 2805213004: Refactor how net/data/verify_certificate_chain_unittest/* (Closed)
Patch Set: fix android Created 3 years, 8 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/verify_certificate_chain_unittest/expired-unconstrained-root/generate-chains.py
diff --git a/net/data/verify_certificate_chain_unittest/generate-expired-unconstrained-root.py b/net/data/verify_certificate_chain_unittest/expired-unconstrained-root/generate-chains.py
similarity index 79%
rename from net/data/verify_certificate_chain_unittest/generate-expired-unconstrained-root.py
rename to net/data/verify_certificate_chain_unittest/expired-unconstrained-root/generate-chains.py
index e415072b3172a07b5470afc35bab5fab6acd001a..c9228b1110251ecc8c210ff4fc2a42aef2002fc2 100755
--- a/net/data/verify_certificate_chain_unittest/generate-expired-unconstrained-root.py
+++ b/net/data/verify_certificate_chain_unittest/expired-unconstrained-root/generate-chains.py
@@ -8,6 +8,9 @@
the trust anchor has no constraints (so expiration of the certificate is not
enforced)."""
+import sys
+sys.path += ['..']
+
import common
# Self-signed root certificate (used as trust anchor).
@@ -23,16 +26,10 @@ intermediate.set_validity_range(common.JANUARY_1_2015_UTC,
target = common.create_end_entity_certificate('Target', intermediate)
target.set_validity_range(common.JANUARY_1_2015_UTC, common.JANUARY_1_2016_UTC)
-chain = [target, intermediate]
-trusted = common.TrustAnchor(root, constrained=False)
# Both the target and intermediate are valid at this time, however the
# root is not. This doesn't matter since the root certificate is
# just a delivery mechanism for the name + SPKI.
-time = common.MARCH_2_2015_UTC
-key_purpose = common.DEFAULT_KEY_PURPOSE
-verify_result = True
-errors = None
-common.write_test_file(__doc__, chain, trusted, time, key_purpose,
- verify_result, errors)
+chain = [target, intermediate, root]
+common.write_chain(__doc__, chain, 'chain.pem')

Powered by Google App Engine
This is Rietveld 408576698