Skip to content

Commit

Permalink
Merge pull request #700 from tomato42/fix-ecdsa-test
Browse files Browse the repository at this point in the history
tls13-ecdsa-in-certificate-verify: re-enable the signature fuzzer
  • Loading branch information
tomato42 committed Oct 13, 2020
2 parents 7cf1f4a + 5750c57 commit 5f145d5
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions scripts/test-tls13-ecdsa-in-certificate-verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
from tlslite.x509certchain import X509CertChain


version = 4
version = 5


def help_msg():
Expand Down Expand Up @@ -119,10 +119,10 @@ def sigalg_select(alg_type, hash_pref, supported=None, cert_type=None):


def main():
"""Check that server propoerly rejects pkcs1 signatures in TLS 1.3"""
"""Check that server properly rejects malformed signatures in TLS 1.3"""
hostname = "localhost"
port = 4433
num_limit = 10
num_limit = 120
run_exclude = set()
expected_failures = {}
last_exp_tmp = None
Expand Down Expand Up @@ -479,17 +479,20 @@ def main():
num_limit = len(conversations_long)

# make sure that sanity test is run first and last
# to verify that server was running and kept running throught
# to verify that server was running and kept running throughout
sanity_tests = [('sanity', conversations['sanity'])]
if run_only:
if num_limit > len(run_only):
num_limit = len(run_only)
regular_tests = [(k, v) for k, v in conversations.items() if k in run_only]
long_tests = [(k, v) for k, v in conversations_long.items() if k in run_only]
short_tests = [(k, v) for k, v in conversations.items() if (k != 'sanity') and k in run_only]
else:
regular_tests = [(k, v) for k, v in conversations.items() if
(k != 'sanity') and k not in run_exclude]
sampled_tests = sample(regular_tests, min(num_limit, len(regular_tests)))
ordered_tests = chain(sanity_tests, sampled_tests, sanity_tests)
long_tests = [(k, v) for k, v in conversations_long.items() if
k not in run_exclude]
short_tests = [(k, v) for k, v in conversations.items() if
(k != 'sanity') and k not in run_exclude]
sampled_tests = sample(long_tests, min(num_limit, len(long_tests)))
ordered_tests = chain(sanity_tests, short_tests, sampled_tests, sanity_tests)

for c_name, c_test in ordered_tests:
print("{0} ...".format(c_name))
Expand Down Expand Up @@ -540,7 +543,7 @@ def main():
print(20 * '=')
print("version: {0}".format(version))
print(20 * '=')
print("TOTAL: {0}".format(len(sampled_tests) + 2*len(sanity_tests)))
print("TOTAL: {0}".format(len(sampled_tests) + len(short_tests) + 2*len(sanity_tests)))
print("SKIP: {0}".format(len(run_exclude.intersection(conversations.keys()))))
print("PASS: {0}".format(good))
print("XFAIL: {0}".format(xfail))
Expand Down

0 comments on commit 5f145d5

Please sign in to comment.