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

Unified Diff: net/data/verify_certificate_chain_unittest/generate-incorrect-trust-anchor.py

Issue 2282183004: Add error information to VerifyCertificateChain(). (Closed)
Patch Set: fix typo in README 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-incorrect-trust-anchor.py
diff --git a/net/data/verify_certificate_chain_unittest/generate-unknown-root.py b/net/data/verify_certificate_chain_unittest/generate-incorrect-trust-anchor.py
similarity index 80%
rename from net/data/verify_certificate_chain_unittest/generate-unknown-root.py
rename to net/data/verify_certificate_chain_unittest/generate-incorrect-trust-anchor.py
index 7de9d67a72361101a0360f9335b9b8feabe5a908..92b4446d4b8b8dab33f3837085eab2bf11b7692c 100755
--- a/net/data/verify_certificate_chain_unittest/generate-unknown-root.py
+++ b/net/data/verify_certificate_chain_unittest/generate-incorrect-trust-anchor.py
@@ -3,9 +3,9 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-"""Certificate chain with 1 intermediate, but the root is not in trust store.
-Verification is expected to fail because the final intermediate (Intermediate)
-does not chain to a known root."""
+"""Certificate chain with 1 intermediate, but the trust anchor used is
+incorrect (neither subject nor signature matches). Verification is expected to
+fail."""
import common
@@ -26,5 +26,6 @@ chain = [target, intermediate]
trusted = common.TrustAnchor(bogus_root, constrained=False)
time = common.DEFAULT_TIME
verify_result = False
+errors = ['Signature verification failed']
-common.write_test_file(__doc__, chain, trusted, time, verify_result)
+common.write_test_file(__doc__, chain, trusted, time, verify_result, errors)

Powered by Google App Engine
This is Rietveld 408576698