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

Unified Diff: net/data/verify_certificate_chain_unittest/generate-unknown-root.py

Issue 2233233002: Refactor some certificate verification tests in preparation to adding (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@trust_anchor
Patch Set: fix 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-unknown-root.py
diff --git a/net/data/verify_certificate_chain_unittest/generate-unknown-root.py b/net/data/verify_certificate_chain_unittest/generate-unknown-root.py
index 523b590667a8a1e100df30c755711a01c536ac5d..7de9d67a72361101a0360f9335b9b8feabe5a908 100755
--- a/net/data/verify_certificate_chain_unittest/generate-unknown-root.py
+++ b/net/data/verify_certificate_chain_unittest/generate-unknown-root.py
@@ -9,7 +9,7 @@ does not chain to a known root."""
import common
-# Self-signed root certificate, which is NOT added to the trust store.
+# Self-signed root certificate, which is NOT saved as the trust anchor.
root = common.create_self_signed_root_certificate('Root')
# Intermediate certificate.
@@ -18,8 +18,12 @@ intermediate = common.create_intermediate_certificate('Intermediate', root)
# Target certificate.
target = common.create_end_entity_certificate('Target', intermediate)
+# Self-signed root certificate, not part of chain, which is saved as trust
+# anchor.
+bogus_root = common.create_self_signed_root_certificate('BogusRoot')
+
chain = [target, intermediate]
-trusted = [] # Note that this lacks |root|
+trusted = common.TrustAnchor(bogus_root, constrained=False)
time = common.DEFAULT_TIME
verify_result = False

Powered by Google App Engine
This is Rietveld 408576698