diff options
author | Jack Lloyd <[email protected]> | 2018-08-21 15:43:34 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-08-22 15:13:14 -0400 |
commit | e05a7337add6c5f61d5abc05bb69c8d0698aa3ef (patch) | |
tree | 8bb911536d39c43385a59d1bc9a09b2b14bd7075 /src/scripts | |
parent | 2fc2598ebab23aa63f7be30c8a2eff6afb262fb3 (diff) |
Default disable support for TLS v1.0/v1.1 and all CBC and CCM suites
Diffstat (limited to 'src/scripts')
-rwxr-xr-x | src/scripts/test_cli.py | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/scripts/test_cli.py b/src/scripts/test_cli.py index 0a76d7465..2f5e5bba4 100755 --- a/src/scripts/test_cli.py +++ b/src/scripts/test_cli.py @@ -425,7 +425,7 @@ def cli_tls_ciphersuite_tests(): for policy in policies: for version in versions: - if policy in ['suiteb_128', 'suiteb_192', 'strict'] and version != 'tls1.2': + if version != 'tls1.2' and policy != 'all': continue output = test_cli("tls_ciphers", ["--version=" + version, "--policy=" + policy], None).split('\n') @@ -648,8 +648,8 @@ def main(args=None): setup_logging(options) - if len(args) != 2: - logging.error("Usage: ./cli_tests.py path_to_botan_cli") + if len(args) < 2: + logging.error("Usage: ./cli_tests.py path_to_botan_cli [test_regex]") return 1 if not os.access(args[1], os.X_OK): @@ -659,6 +659,10 @@ def main(args=None): global CLI_PATH CLI_PATH = args[1] + test_regex = None + if len(args) == 3: + test_regex = re.compile(args[2]) + start_time = time.time() test_fns = [ @@ -694,10 +698,16 @@ def main(args=None): ] for fn in test_fns: + fn_name = fn.__name__ + + if test_regex is not None: + if test_regex.match(fn_name) is None: + continue + start = time.time() fn() end = time.time() - logging.debug("Ran %s in %.02f", fn.__name__, end-start) + logging.debug("Ran %s in %.02f", fn_name, end-start) end_time = time.time() |