aboutsummaryrefslogtreecommitdiffstats
path: root/lang/cpp/src/verificationresult.cpp
diff options
context:
space:
mode:
authorAndre Heinecke <[email protected]>2018-07-24 06:40:28 +0000
committerAndre Heinecke <[email protected]>2018-07-24 06:40:28 +0000
commita6e5c8bf18696007c48c6f362aa355020fe82f21 (patch)
tree1dbe85e013210d0ca0cb48374f4e0463bea86835 /lang/cpp/src/verificationresult.cpp
parentdocs: python bindings howto (diff)
downloadgpgme-a6e5c8bf18696007c48c6f362aa355020fe82f21.tar.gz
gpgme-a6e5c8bf18696007c48c6f362aa355020fe82f21.zip
cpp: Add safety checks for key update
* lang/cpp/src/key.cpp (Key::update): Check that the key is not NULL. * lang/cpp/src/verificationresult.cpp (GpgME::Signature::key): Check for fingerprint.
Diffstat (limited to 'lang/cpp/src/verificationresult.cpp')
-rw-r--r--lang/cpp/src/verificationresult.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lang/cpp/src/verificationresult.cpp b/lang/cpp/src/verificationresult.cpp
index 2c42d074..fa8237ad 100644
--- a/lang/cpp/src/verificationresult.cpp
+++ b/lang/cpp/src/verificationresult.cpp
@@ -406,7 +406,7 @@ GpgME::Key GpgME::Signature::key(bool search, bool update) const
}
GpgME::Key ret = key();
- if (ret.isNull() && search) {
+ if (ret.isNull() && search && fingerprint ()) {
auto ctx = Context::createForProtocol (d->proto);
if (ctx) {
ctx->setKeyListMode(KeyListMode::Local |