summaryrefslogtreecommitdiff
path: root/xmlsecurity/source/gpg/CertificateImpl.cxx
diff options
context:
space:
mode:
authorThorsten Behrens <Thorsten.Behrens@CIB.de>2017-10-18 12:48:55 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2017-10-18 15:06:07 +0200
commit7b00829e27b0a26e9fa8d06bb651134f03a466e9 (patch)
tree0ebe0b0963112f7c7422fce116a159a2504b91ee /xmlsecurity/source/gpg/CertificateImpl.cxx
parent811e636d920ee96e7ebd120b3931cb3da43d0143 (diff)
gpg4libre - tdf#113188 add option for minimal PGPKeyPacket
Change-Id: I660e68074616f6953e6527e40ec22276ce8ef2fb Reviewed-on: https://gerrit.libreoffice.org/43492 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'xmlsecurity/source/gpg/CertificateImpl.cxx')
-rw-r--r--xmlsecurity/source/gpg/CertificateImpl.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/xmlsecurity/source/gpg/CertificateImpl.cxx b/xmlsecurity/source/gpg/CertificateImpl.cxx
index 49674f877956..6d06b24c3a2a 100644
--- a/xmlsecurity/source/gpg/CertificateImpl.cxx
+++ b/xmlsecurity/source/gpg/CertificateImpl.cxx
@@ -13,6 +13,7 @@
#include <comphelper/sequence.hxx>
#include <com/sun/star/security/KeyUsage.hpp>
+#include <officecfg/Office/Common.hxx>
#include <gpgme.h>
#include <context.h>
@@ -212,7 +213,10 @@ void CertificateImpl::setCertificate(GpgME::Context* ctx, const GpgME::Key& key)
// extract key data, store into m_aBits
GpgME::Data data_out;
ctx->setArmor(false); // caller will base64-encode anyway
- GpgME::Error err = ctx->exportPublicKeys(key.primaryFingerprint(), data_out);
+ GpgME::Error err = ctx->exportPublicKeys(
+ key.primaryFingerprint(),
+ data_out,
+ officecfg::Office::Common::Security::OpenPGP::MinimalKeyExport::get());
if (err)
throw RuntimeException("The GpgME library failed to retrieve the public key");