summaryrefslogtreecommitdiff
path: root/src/pubkey.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pubkey.cpp')
-rw-r--r--src/pubkey.cpp3
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)