aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-08-02 17:15:50 -0400
committerJack Lloyd <[email protected]>2018-08-02 17:15:50 -0400
commit408512a65b169786777846a825b5b010bdb73aaa (patch)
tree9d7dcdd0a3625b1c9e0f103d2a1088ae89d5be23 /src
parentb126a7c5baa8d010eb8ada865ce494b82c9779dc (diff)
More CLI tests
Diffstat (limited to 'src')
-rwxr-xr-xsrc/scripts/test_cli.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/scripts/test_cli.py b/src/scripts/test_cli.py
index a5639ddba..86d9e1900 100755
--- a/src/scripts/test_cli.py
+++ b/src/scripts/test_cli.py
@@ -264,6 +264,13 @@ mlLtJ5JvZ0/p6zP3x+Y9yPIrAR8L/acG5ItSrAKXzzuqQQZMv4aN
test_cli("cert_verify", ca_cert, "Certificate did not validate - Cannot establish trust")
+ cert_info = test_cli("cert_info", ['--fingerprint', ca_cert], None)
+
+ if cert_info.find('Subject: CN="CA",C="VT"') < 0:
+ logging.error('Unexpected output for cert_info command %s', cert_info)
+ if cert_info.find('Subject keyid: 69DD911C9EEE3400C67CBC3F3056CBE711BD56AF9495013F') < 0:
+ logging.error('Unexpected output for cert_info command %s', cert_info)
+
test_cli("gen_pkcs10", "%s User --output=%s" % (priv_key, crt_req))
test_cli("sign_cert", "%s %s %s --output=%s" % (ca_cert, priv_key, crt_req, user_cert))
@@ -580,7 +587,8 @@ def cli_speed_tests():
logging.error("Unexpected line %s", line)
math_ops = ['mp_mul', 'modexp', 'random_prime', 'inverse_mod', 'rfc3394', 'fpe_fe1',
- 'bn_redc', 'nistp_redc', 'ecc_mult', 'ecc_ops', 'os2ecp', 'bcrypt', 'passhash9']
+ 'bn_redc', 'nistp_redc', 'ecc_mult', 'ecc_ops', 'os2ecp', 'primality_test',
+ 'bcrypt', 'passhash9']
format_re = re.compile(r'^.* [0-9]+ /sec; [0-9]+\.[0-9]+ ms/op .*\([0-9]+ (op|ops) in [0-9]+(\.[0-9]+)? ms\)')
for op in math_ops: