summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Behrens <Thorsten.Behrens@CIB.de>2017-10-18 14:23:37 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2017-10-18 15:07:11 +0200
commit087a90e27b7219e8c1aaa880b39376c94a0dcaae (patch)
tree686e6554b76f4b8af75f0ad6a7689a8f44305e84
parent7b00829e27b0a26e9fa8d06bb651134f03a466e9 (diff)
gpg4libre fix tdf#113190 don't show expired/invalid keysgpg4libre-review-5.4.99
Change-Id: I30485bc97d3d287bd867b50398927eabe018914b Reviewed-on: https://gerrit.libreoffice.org/43502 Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
-rw-r--r--xmlsecurity/source/gpg/SecurityEnvironment.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmlsecurity/source/gpg/SecurityEnvironment.cxx b/xmlsecurity/source/gpg/SecurityEnvironment.cxx
index c3cd90565fe2..2392bf0c8031 100644
--- a/xmlsecurity/source/gpg/SecurityEnvironment.cxx
+++ b/xmlsecurity/source/gpg/SecurityEnvironment.cxx
@@ -76,7 +76,7 @@ Sequence< Reference < XCertificate > > SecurityEnvironmentGpg::getCertificatesIm
GpgME::Key k = m_ctx->nextKey(err);
if (err)
break;
- if (!k.isInvalid()) {
+ if (!k.isRevoked() && !k.isExpired() && !k.isDisabled() && !k.isInvalid()) {
// We can't create CertificateImpl here as CertificateImpl::setCertificate uses GpgME API
// which interrupts our key listing here. So first get the keys from GpgME, then create the CertificateImpls
keyList.push_back(k);