summaryrefslogtreecommitdiff
path: root/xmlsecurity/source/gpg/CertificateImpl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmlsecurity/source/gpg/CertificateImpl.cxx')
-rw-r--r--xmlsecurity/source/gpg/CertificateImpl.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/xmlsecurity/source/gpg/CertificateImpl.cxx b/xmlsecurity/source/gpg/CertificateImpl.cxx
index 6d06b24c3a2a..16eeda80441f 100644
--- a/xmlsecurity/source/gpg/CertificateImpl.cxx
+++ b/xmlsecurity/source/gpg/CertificateImpl.cxx
@@ -7,6 +7,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <config_gpgme.h>
+
#include "CertificateImpl.hxx"
#include <comphelper/servicehelper.hxx>
@@ -215,8 +217,11 @@ void CertificateImpl::setCertificate(GpgME::Context* ctx, const GpgME::Key& key)
ctx->setArmor(false); // caller will base64-encode anyway
GpgME::Error err = ctx->exportPublicKeys(
key.primaryFingerprint(),
- data_out,
- officecfg::Office::Common::Security::OpenPGP::MinimalKeyExport::get());
+ data_out
+#if GPGME_CAN_EXPORT_MINIMAL_KEY
+ , officecfg::Office::Common::Security::OpenPGP::MinimalKeyExport::get()
+#endif
+ );
if (err)
throw RuntimeException("The GpgME library failed to retrieve the public key");