diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2015-12-28 03:26:46 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2015-12-28 03:26:46 +0300 |
commit | 6fe0f155b0a0daa5affe1482da50cbe152358b07 (patch) | |
tree | a305e26159bcb266c02cd8e9f9292bad839bda79 /test | |
parent | utils: refactoring (diff) | |
download | aes-tools-6fe0f155b0a0daa5affe1482da50cbe152358b07.tar.gz aes-tools-6fe0f155b0a0daa5affe1482da50cbe152358b07.zip |
utils: interface update & refactoring
Diffstat (limited to '')
-rw-r--r-- | test/cavp.py | 4 | ||||
-rw-r--r-- | test/nist-sp-800-38a.py | 6 | ||||
-rw-r--r-- | test/toolkit.py | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/test/cavp.py b/test/cavp.py index fb719f4..01d1e8d 100644 --- a/test/cavp.py +++ b/test/cavp.py @@ -184,7 +184,7 @@ if __name__ == '__main__': help='set path to block encryption utilities') parser.add_argument('--sde', '-e', action='store_true', help='use Intel SDE to run *.exe files') - parser.add_argument('--box', '-b', action='store_true', + parser.add_argument('--use-boxes', '-b', action='store_true', help='use the "boxes" interface') parser.add_argument('--archive', '-a', default='KAT_AES.zip', help='set path of the archive with the test vectors') @@ -202,4 +202,4 @@ if __name__ == '__main__': logging.basicConfig(**logging_options) tools = toolkit.Tools(args.path, use_sde=args.sde) - _parse_archive_and_run_tests(tools, args.archive, use_boxes=args.box) + _parse_archive_and_run_tests(tools, args.archive, use_boxes=args.use_boxes) diff --git a/test/nist-sp-800-38a.py b/test/nist-sp-800-38a.py index 05f0a39..a096a42 100644 --- a/test/nist-sp-800-38a.py +++ b/test/nist-sp-800-38a.py @@ -181,7 +181,7 @@ if __name__ == '__main__': help='set path to block encryption utilities') parser.add_argument('--sde', '-e', action='store_true', help='use Intel SDE to run *.exe files') - parser.add_argument('--box', '-b', action='store_true', + parser.add_argument('--use-boxes', '-b', action='store_true', help='use the "boxes" interface') parser.add_argument('--log', '-l', help='set log file path') args = parser.parse_args() @@ -216,13 +216,13 @@ if __name__ == '__main__': mode = maybe_mode logging.info('Mode: ' + mode) try: - exit_codes.append(_run_encryption_tests(tools, algo, mode, use_boxes=args.box)) + exit_codes.append(_run_encryption_tests(tools, algo, mode, use_boxes=args.use_boxes)) except Exception as e: logging.error('Encountered an exception!') logging.exception(e) exit_codes.append(_TestExitCode.ERROR) try: - exit_codes.append(_run_decryption_tests(tools, algo, mode, use_boxes=args.box)) + exit_codes.append(_run_decryption_tests(tools, algo, mode, use_boxes=args.use_boxes)) except Exception as e: logging.error('Encountered an exception!') logging.exception(e) diff --git a/test/toolkit.py b/test/toolkit.py index 170bccf..8798e6d 100644 --- a/test/toolkit.py +++ b/test/toolkit.py @@ -128,7 +128,7 @@ class Tools: '--mode', mode, ] if use_boxes: - args.append('--box') + args.append('--use-boxes') if isinstance(inputs, collections.Iterable): args.extend(self._block_inputs_to_args(iter(inputs))) else: @@ -141,7 +141,7 @@ class Tools: '--mode', mode, ] if use_boxes: - args.append('--box') + args.append('--use-boxes') if isinstance(inputs, collections.Iterable): args.extend(self._block_inputs_to_args(iter(inputs))) else: |