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

Unified Diff: net/data/verify_certificate_chain_unittest/generate-violates-pathlen-1-constrained-root.py

Issue 2245643004: Support trust anchor constraints, by specifying them as a certificate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update gypi Created 4 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/verify_certificate_chain_unittest/generate-violates-pathlen-1-constrained-root.py
diff --git a/net/data/verify_certificate_chain_unittest/generate-violates-pathlen-1-root.py b/net/data/verify_certificate_chain_unittest/generate-violates-pathlen-1-constrained-root.py
similarity index 82%
copy from net/data/verify_certificate_chain_unittest/generate-violates-pathlen-1-root.py
copy to net/data/verify_certificate_chain_unittest/generate-violates-pathlen-1-constrained-root.py
index ac52c189a6d0ad9a6a4c66bf1965ceba5921fac6..8a2f658025b2aa0953104a358f742ffb9d0bbe5d 100755
--- a/net/data/verify_certificate_chain_unittest/generate-violates-pathlen-1-root.py
+++ b/net/data/verify_certificate_chain_unittest/generate-violates-pathlen-1-constrained-root.py
@@ -4,8 +4,8 @@
# found in the LICENSE file.
"""Certificate chain with 2 intermediates and one end entity certificate. The
-root certificate has a pathlen:1 restriction. Ordinarily this would be an
-invalid chain, however constraints on trust anchors are not validated."""
+root certificate has a pathlen:1 restriction, and constraints are enforced
+on this trust anchor making it an invalid chain."""
import common
@@ -25,8 +25,8 @@ intermediate2 = common.create_intermediate_certificate('Intermediate2',
target = common.create_end_entity_certificate('Target', intermediate2)
chain = [target, intermediate2, intermediate1]
-trusted = common.TrustAnchor(root, constrained=False)
+trusted = common.TrustAnchor(root, constrained=True)
time = common.DEFAULT_TIME
-verify_result = True
+verify_result = False
common.write_test_file(__doc__, chain, trusted, time, verify_result)

Powered by Google App Engine
This is Rietveld 408576698