aboutsummaryrefslogtreecommitdiffstats
path: root/lang/cpp/src/key.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lang/cpp/src/key.cpp')
-rw-r--r--lang/cpp/src/key.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lang/cpp/src/key.cpp b/lang/cpp/src/key.cpp
index eb7a5030..e2d91a10 100644
--- a/lang/cpp/src/key.cpp
+++ b/lang/cpp/src/key.cpp
@@ -753,8 +753,12 @@ const char *UserID::remark(const Key &remarker, Error &err) const
return nullptr;
}
- if (!(parent().keyListMode() & GPGME_KEYLIST_MODE_SIG_NOTATIONS) ||
- !(parent().keyListMode() & GPGME_KEYLIST_MODE_SIGS)) {
+ if (key->protocol != GPGME_PROTOCOL_OpenPGP) {
+ return nullptr;
+ }
+
+ if (!(key->keylist_mode & GPGME_KEYLIST_MODE_SIG_NOTATIONS) ||
+ !(key->keylist_mode & GPGME_KEYLIST_MODE_SIGS)) {
err = Error::fromCode(GPG_ERR_NO_DATA);
return nullptr;
}