summaryrefslogtreecommitdiff
path: root/tools/testcase1.py
diff options
context:
space:
mode:
authorMagnus Ahltorp <map@kth.se>2015-04-10 15:42:03 +0200
committerMagnus Ahltorp <map@kth.se>2015-04-10 15:44:26 +0200
commit6402eeefc18c47b7dceea5e0dda0b8aeec6719bd (patch)
tree56b0e91fabdc01c17fe37a44f77b707060171a30 /tools/testcase1.py
parent263862c06abd93d39d98fd40007f80b5fe57f030 (diff)
Verify SSL certificates and hostnames in python codesslverify
Closes CATLFISH-34
Diffstat (limited to 'tools/testcase1.py')
-rwxr-xr-xtools/testcase1.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/testcase1.py b/tools/testcase1.py
index 1d46230..c1100ea 100755
--- a/tools/testcase1.py
+++ b/tools/testcase1.py
@@ -16,6 +16,7 @@ from certtools import *
baseurls = [sys.argv[1]]
logpublickeyfile = sys.argv[2]
+cacertfile = sys.argv[3]
certfiles = ["../tools/testcerts/cert1.txt", "../tools/testcerts/cert2.txt",
"../tools/testcerts/cert3.txt", "../tools/testcerts/cert4.txt",
@@ -27,6 +28,8 @@ cc3 = get_certs_from_file(certfiles[2])
cc4 = get_certs_from_file(certfiles[3])
cc5 = get_certs_from_file(certfiles[4])
+create_ssl_context(cafile=cacertfile)
+
failures = 0
indentation = ""