aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Neus <[email protected]>2016-07-05 16:42:54 +0200
committerDaniel Neus <[email protected]>2016-07-05 16:42:54 +0200
commitfc8666b2cc7cda87b72e23b295617f70d8211818 (patch)
tree2f6acd8f913468d191d14fbebdfc615ba85b474e /src
parent3f91b0f930ba1cfcc77753a09d313dfe53934e16 (diff)
PKCS11 tests: run ECDSA software verification only if emsa_raw module is available
Diffstat (limited to 'src')
-rw-r--r--src/tests/test_pkcs11_high_level.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tests/test_pkcs11_high_level.cpp b/src/tests/test_pkcs11_high_level.cpp
index 3be2b7268..677041533 100644
--- a/src/tests/test_pkcs11_high_level.cpp
+++ b/src/tests/test_pkcs11_high_level.cpp
@@ -1042,10 +1042,13 @@ Test::Result test_ecdsa_sign_verify()
result.test_eq("ECDSA PKCS11 sign and verify: " + emsa, ecdsa_ok, true);
+// test against software implementation if available
+#if defined (BOTAN_HAS_EMSA_RAW)
Botan::PK_Verifier soft_verifier(keypair.first, emsa, Botan::IEEE_1363);
bool soft_ecdsa_ok = soft_verifier.verify_message(plaintext, signature);
result.test_eq("ECDSA PKCS11 verify (in software): " + emsa, soft_ecdsa_ok, true);
+#endif
};
sign_and_verify("Raw"); // SoftHSMv2 until now only supports "Raw"