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

Unified Diff: net/data/verify_certificate_chain_unittest/common.py

Issue 2282183004: Add error information to VerifyCertificateChain(). (Closed)
Patch Set: 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/common.py
diff --git a/net/data/verify_certificate_chain_unittest/common.py b/net/data/verify_certificate_chain_unittest/common.py
index b21e2a9c806f190a0d841d8a170e7c59e2f8e6d2..d0f16c4e46af7407d9b8dbe40f547175ba8de632 100755
--- a/net/data/verify_certificate_chain_unittest/common.py
+++ b/net/data/verify_certificate_chain_unittest/common.py
@@ -436,7 +436,7 @@ class TrustAnchor(object):
def write_test_file(description, chain, trust_anchor, utc_time, verify_result,
- out_pem=None):
+ errors, out_pem=None):
"""Writes a test file that contains all the inputs necessary to run a
verification on a certificate chain"""
@@ -453,6 +453,9 @@ def write_test_file(description, chain, trust_anchor, utc_time, verify_result,
verify_result_string = 'SUCCESS' if verify_result else 'FAIL'
test_data += '\n' + data_to_pem('VERIFY_RESULT', verify_result_string)
+ if errors is not None:
+ test_data += '\n' + data_to_pem('ERRORS', '\n'.join(errors))
+
write_string_to_file(test_data, out_pem if out_pem else g_out_pem)

Powered by Google App Engine
This is Rietveld 408576698