summaryrefslogtreecommitdiff
path: root/lang/cpp/src/key.cpp
diff options
context:
space:
mode:
authorJinWang An <jinwang.an@samsung.com>2021-12-01 16:54:37 +0900
committerJinWang An <jinwang.an@samsung.com>2021-12-01 16:54:37 +0900
commit56c3832bc03cffe24fcca71370b668a6678d0cf9 (patch)
tree7d2ccfe8d9c60dbb012bb62d7fcd6820db56dc61 /lang/cpp/src/key.cpp
parent398648eddb70bc844e1bc5996521e87dea3188e9 (diff)
downloadgpgme-56c3832bc03cffe24fcca71370b668a6678d0cf9.tar.gz
gpgme-56c3832bc03cffe24fcca71370b668a6678d0cf9.tar.bz2
gpgme-56c3832bc03cffe24fcca71370b668a6678d0cf9.zip
Imported Upstream version 1.12.0upstream/1.12.0
Diffstat (limited to 'lang/cpp/src/key.cpp')
-rw-r--r--lang/cpp/src/key.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lang/cpp/src/key.cpp b/lang/cpp/src/key.cpp
index 034286f..8fc266f 100644
--- a/lang/cpp/src/key.cpp
+++ b/lang/cpp/src/key.cpp
@@ -347,6 +347,9 @@ const Key &Key::mergeWith(const Key &other)
void Key::update()
{
+ if (isNull() || !primaryFingerprint()) {
+ return;
+ }
auto ctx = Context::createForProtocol(protocol());
if (!ctx) {
return;
@@ -1042,6 +1045,8 @@ std::ostream &operator<<(std::ostream &os, const UserID &uid)
<< "\n revoked: " << uid.isRevoked()
<< "\n invalid: " << uid.isInvalid()
<< "\n numsigs: " << uid.numSignatures()
+ << "\n origin: " << uid.origin()
+ << "\n updated: " << uid.lastUpdate()
<< "\n tofuinfo:\n" << uid.tofuInfo();
}
return os << ')';
@@ -1060,6 +1065,8 @@ std::ostream &operator<<(std::ostream &os, const Key &key)
<< "\n canEncrypt: " << key.canEncrypt()
<< "\n canCertify: " << key.canCertify()
<< "\n canAuth: " << key.canAuthenticate()
+ << "\n origin: " << key.origin()
+ << "\n updated: " << key.lastUpdate()
<< "\n uids:\n";
const std::vector<UserID> uids = key.userIDs();
std::copy(uids.begin(), uids.end(),