aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/tests/unit_ecdsa.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tests/unit_ecdsa.cpp b/src/tests/unit_ecdsa.cpp
index b4bafd7e4..99acc3f21 100644
--- a/src/tests/unit_ecdsa.cpp
+++ b/src/tests/unit_ecdsa.cpp
@@ -216,11 +216,11 @@ Test::Result test_ecdsa_create_save_load()
std::unique_ptr<Botan::Private_Key> loaded_key(Botan::PKCS8::load_key(pem_src, Test::rng()));
Botan::ECDSA_PrivateKey* loaded_ec_key = dynamic_cast<Botan::ECDSA_PrivateKey*>(loaded_key.get());
result.confirm("the loaded key could be converted into an ECDSA_PrivateKey", loaded_ec_key);
- result.confirm("the loaded key produces equal encoding",
- (ecc_private_key_pem == Botan::PKCS8::PEM_encode(*loaded_ec_key)));
if(loaded_ec_key)
{
+ result.confirm("the loaded key produces equal encoding",
+ (ecc_private_key_pem == Botan::PKCS8::PEM_encode(*loaded_ec_key)));
Botan::PK_Verifier verifier(*loaded_ec_key, "EMSA1(SHA-256)");
result.confirm("generated signature valid", verifier.verify_message(msg, msg_signature));
}