diff options
Diffstat (limited to 'xmlsecurity/source/gpg/xmlsignature_gpgimpl.cxx')
-rw-r--r-- | xmlsecurity/source/gpg/xmlsignature_gpgimpl.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/xmlsecurity/source/gpg/xmlsignature_gpgimpl.cxx b/xmlsecurity/source/gpg/xmlsignature_gpgimpl.cxx index 686258eeca00..b9219f0f3281 100644 --- a/xmlsecurity/source/gpg/xmlsignature_gpgimpl.cxx +++ b/xmlsecurity/source/gpg/xmlsignature_gpgimpl.cxx @@ -171,10 +171,12 @@ SAL_CALL XMLSignature_GpgImpl::generate( throw RuntimeException("The GpgME library failed to initialize for the OpenPGP protocol."); //Sign the template via gpgme + // TODO move init to central place GpgME::initializeLibrary(); if( GpgME::checkEngine(GpgME::OpenPGP) ) throw RuntimeException("The GpgME library failed to initialize for the OpenPGP protocol."); + // TODO get ctx from SecurityEnv? GpgME::Context* ctx = GpgME::Context::createForProtocol(GpgME::OpenPGP); if( ctx == nullptr ) throw RuntimeException("The GpgME library failed to initialize for the OpenPGP protocol."); @@ -315,10 +317,12 @@ SAL_CALL XMLSignature_GpgImpl::validate( throw RuntimeException("The GpgME library failed to initialize for the OpenPGP protocol."); // Validate the template via gpgme + // TODO move init to central place GpgME::initializeLibrary(); if( GpgME::checkEngine(GpgME::OpenPGP) ) throw RuntimeException("The GpgME library failed to initialize for the OpenPGP protocol."); + // TODO get ctx from SecurityEnv? GpgME::Context* ctx = GpgME::Context::createForProtocol(GpgME::OpenPGP); if( ctx == nullptr ) throw RuntimeException("The GpgME library failed to initialize for the OpenPGP protocol."); |