[git] GPGME - branch, master, updated. gpgme-1.8.0-13-g85e0553
by Andre Heinecke
cvs at cvs.gnupg.org
Thu Dec 15 11:39:29 CET 2016
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG Made Easy".
The branch, master has been updated
via 85e05537e15346896a271d3f62bead9dd7e3f180 (commit)
via 5673f3e54af535155893290a685b3afb44c7f58d (commit)
from ecb0e3280a7db0e8f6ef395cf64f36a36b15be37 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 85e05537e15346896a271d3f62bead9dd7e3f180
Author: Andre Heinecke <aheinecke at intevation.de>
Date: Thu Dec 15 11:31:14 2016 +0100
cpp: Fix addrSpec for keys without email
* lang/cpp/src/key.cpp (UserID::addrSpec): Use uid->address instead
of normalizing again.
(&operator<<(std::ostream &, const UserID &): Print it.
--
This saves a normalization and fixes the case where a user id
is just a mail address without name, in that case gpgme sets
"address" but not email. Because the email is then the name.
diff --git a/lang/cpp/src/key.cpp b/lang/cpp/src/key.cpp
index 235a3c8..d621a81 100644
--- a/lang/cpp/src/key.cpp
+++ b/lang/cpp/src/key.cpp
@@ -894,7 +894,11 @@ std::string UserID::addrSpecFromString(const char *userid)
std::string UserID::addrSpec() const
{
- return addrSpecFromString(email());
+ if (!uid || !uid->address) {
+ return std::string();
+ }
+
+ return uid->address;
}
std::ostream &operator<<(std::ostream &os, const UserID &uid)
@@ -903,6 +907,7 @@ std::ostream &operator<<(std::ostream &os, const UserID &uid)
if (!uid.isNull()) {
os << "\n name: " << protect(uid.name())
<< "\n email: " << protect(uid.email())
+ << "\n mbox: " << uid.addrSpec()
<< "\n comment: " << protect(uid.comment())
<< "\n validity: " << uid.validityAsString()
<< "\n revoked: " << uid.isRevoked()
commit 5673f3e54af535155893290a685b3afb44c7f58d
Author: Andre Heinecke <aheinecke at intevation.de>
Date: Thu Dec 15 11:24:43 2016 +0100
cpp: Fix update of partial key in verifyresult
* lang/cpp/src/verificationresult.cpp
(Signature::key(bool,bool)): Don't update the returned copy
but the actual key of the signature.
--
The whole point of the update is to change the partial key
from the signature (e.g. only fingerprint and one uid as we
would have from tofu) to a fully keylisted one.
diff --git a/lang/cpp/src/verificationresult.cpp b/lang/cpp/src/verificationresult.cpp
index 23c458e..42e483c 100644
--- a/lang/cpp/src/verificationresult.cpp
+++ b/lang/cpp/src/verificationresult.cpp
@@ -413,7 +413,8 @@ GpgME::Key GpgME::Signature::key(bool search, bool update) const
}
}
if (update) {
- ret.update();
+ d->keys[idx].update();
+ ret = d->keys[idx];
}
return ret;
}
-----------------------------------------------------------------------
Summary of changes:
lang/cpp/src/key.cpp | 7 ++++++-
lang/cpp/src/verificationresult.cpp | 3 ++-
2 files changed, 8 insertions(+), 2 deletions(-)
hooks/post-receive
--
GnuPG Made Easy
http://git.gnupg.org
More information about the Gnupg-commits
mailing list