diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2023-06-18 10:44:29 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2023-06-18 22:41:23 +0200 |
commit | afab7dc5673fbc5fd600182612626676ae36d1c0 (patch) | |
tree | 4c13a887b3840894c2be520aec51f933b0239563 /src/pubkey.cpp | |
parent | e7d6aafd3c9353d9e6169ca775cf1dae618238cd (diff) |
Fail validation of signature with missing key instead throwing exception
Diffstat (limited to 'src/pubkey.cpp')
-rw-r--r-- | src/pubkey.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pubkey.cpp b/src/pubkey.cpp index 6461c10..59b73f9 100644 --- a/src/pubkey.cpp +++ b/src/pubkey.cpp @@ -173,6 +173,9 @@ Ref Signature::store(const Storage & st) const bool Signature::verify(const Ref & ref) const { + if (!key->key) + return false; + unique_ptr<EVP_MD_CTX, void(*)(EVP_MD_CTX*)> mdctx(EVP_MD_CTX_create(), &EVP_MD_CTX_free); if (!mdctx) |