Kaydet (Commit) 1e718700 authored tarafından Thorsten Behrens's avatar Thorsten Behrens

gpg4libre: rename GPGME_HAVE_GPGME to HAVE_FEATURE_GPGME

Change-Id: I6f085b67c3477f427bd1efd96db93cbb89e20647
Reviewed-on: https://gerrit.libreoffice.org/46050Reviewed-by: 's avatarThorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: 's avatarThorsten Behrens <Thorsten.Behrens@CIB.de>
üst 8976e546
......@@ -56,7 +56,7 @@
#include <comphelper/storagehelper.hxx>
#include <comphelper/sequence.hxx>
#if GPGME_HAVE_GPGME
#if HAVE_FEATURE_GPGME
# include <gpgme.h>
# include <context.h>
# include <encryptionresult.h>
......@@ -432,7 +432,7 @@ uno::Sequence< beans::NamedValue > OStorageHelper::CreatePackageEncryptionData(
uno::Sequence< beans::NamedValue > OStorageHelper::CreateGpgPackageEncryptionData()
{
#if GPGME_HAVE_GPGME
#if HAVE_FEATURE_GPGME
// generate session key
// --------------------
......
......@@ -14,9 +14,10 @@
#define CONFIG_GPGME_H
// Defined if gpgme support is available
#define GPGME_HAVE_GPGME 0
#if GPGME_HAVE_GPGME
#include "config_lgpl.h"
#define HAVE_FEATURE_GPGME 0
#if HAVE_FEATURE_GPGME
# include "config_lgpl.h"
#endif
// Defined if gpgme supports exporting minimal key.
......
......@@ -10217,7 +10217,7 @@ if test "$_os" = "Linux" -o "$_os" = "Darwin" -o "$_os" = "WINNT" ; then
fi
fi
ENABLE_GPGMEPP=TRUE
AC_DEFINE([GPGME_HAVE_GPGME])
AC_DEFINE([HAVE_FEATURE_GPGME])
fi
AC_SUBST(ENABLE_GPGMEPP)
AC_SUBST(SYSTEM_GPGMEPP)
......
......@@ -20,9 +20,9 @@
#include <comphelper/string.hxx>
#include <config_gpgme.h>
#if GPGME_HAVE_GPGME
#include <com/sun/star/xml/crypto/GPGSEInitializer.hpp>
#include <com/sun/star/xml/crypto/XXMLSecurityContext.hpp>
#if HAVE_FEATURE_GPGME
# include <com/sun/star/xml/crypto/GPGSEInitializer.hpp>
# include <com/sun/star/xml/crypto/XXMLSecurityContext.hpp>
#endif
#include <i18nlangtag/mslangid.hxx>
......@@ -214,7 +214,7 @@ SvxGeneralTabPage::SvxGeneralTabPage(vcl::Window* pParent, const SfxItemSet& rCo
InitControls();
SetExchangeSupport(); // this page needs ExchangeSupport
SetLinks();
#if GPGME_HAVE_GPGME
#if HAVE_FEATURE_GPGME
// unused yet, I just wanted to see if this delivers the desired results
uno::Reference< xml::crypto::XSEInitializer > xSEInitializer;
try
......
......@@ -104,7 +104,7 @@ public:
/// Test importing of signature line images
void testSignatureLineImages();
#ifdef LINUX
# if GPGME_HAVE_GPGME
# if HAVE_FEATURE_GPGME
/// Test a typical ODF where all streams are GPG-signed.
void testODFGoodGPG();
/// Test a typical ODF where all streams are GPG-signed, but we don't trust the signature.
......@@ -138,7 +138,7 @@ public:
CPPUNIT_TEST(testXAdESGood);
CPPUNIT_TEST(testSignatureLineImages);
#ifdef LINUX
# if GPGME_HAVE_GPGME
# if HAVE_FEATURE_GPGME
CPPUNIT_TEST(testODFGoodGPG);
CPPUNIT_TEST(testODFUntrustedGoodGPG);
CPPUNIT_TEST(testODFBrokenStreamGPG);
......@@ -178,7 +178,7 @@ void SigningTest::setUp()
setenv("MOZILLA_CERTIFICATE_FOLDER", aTargetPath.toUtf8().getStr(), 1);
#endif
#ifdef LINUX
# if GPGME_HAVE_GPGME
# if HAVE_FEATURE_GPGME
// Make gpg use our own defined setup below data dir
OUString aHomePath;
osl::FileBase::getSystemPathFromFileURL(
......@@ -688,7 +688,7 @@ void SigningTest::testSignatureLineImages()
}
#ifdef LINUX
# if GPGME_HAVE_GPGME
# if HAVE_FEATURE_GPGME
void SigningTest::testODFGoodGPG()
{
createDoc(m_directories.getURLFromSrc(DATA_DIRECTORY) + "goodGPG.odt");
......
......@@ -66,14 +66,14 @@ bool DocumentSignatureManager::init()
initXmlSec();
mxSEInitializer = xml::crypto::SEInitializer::create(mxContext);
#if GPGME_HAVE_GPGME
#if HAVE_FEATURE_GPGME
mxGpgSEInitializer.set(new SEInitializerGpg());
#endif
if (mxSEInitializer.is())
mxSecurityContext = mxSEInitializer->createSecurityContext(OUString());
#if GPGME_HAVE_GPGME
#if HAVE_FEATURE_GPGME
if (mxGpgSEInitializer.is())
mxGpgSecurityContext = mxGpgSEInitializer->createSecurityContext(OUString());
......
......@@ -23,7 +23,7 @@
#include <documentsignaturehelper.hxx>
#include <framework/saxeventkeeperimpl.hxx>
#include <xmlsec/xmldocumentwrapper_xmlsecimpl.hxx>
#if GPGME_HAVE_GPGME
#if HAVE_FEATURE_GPGME
# include <gpg/xmlsignature_gpgimpl.hxx>
#endif
......@@ -161,7 +161,7 @@ void XSecController::createXSecComponent( )
cssu::Reference< cssl::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() );
#if GPGME_HAVE_GPGME
#if HAVE_FEATURE_GPGME
uno::Reference< lang::XServiceInfo > xServiceInfo( m_xSecurityContext, cssu::UNO_QUERY );
if (xServiceInfo->getImplementationName() == "com.sun.star.xml.security.gpg.XMLSecurityContext_GpgImpl")
m_xXMLSignature.set(new XMLSignature_GpgImpl());
......
......@@ -120,7 +120,7 @@ void XSecController::addSignature()
void XSecController::switchGpgSignature()
{
#if GPGME_HAVE_GPGME
#if HAVE_FEATURE_GPGME
// swap signature verifier for the Gpg one
m_xXMLSignature.set(new XMLSignature_GpgImpl());
if (!m_vInternalSignatureInformations.empty())
......
......@@ -28,9 +28,9 @@
#include "xsec_xmlsec.hxx"
#include <config_gpgme.h>
#if GPGME_HAVE_GPGME
#include <gpg/xmlsignature_gpgimpl.hxx>
#include <gpg/SEInitializer.hxx>
#if HAVE_FEATURE_GPGME
# include <gpg/xmlsignature_gpgimpl.hxx>
# include <gpg/SEInitializer.hxx>
#endif
using namespace ::cppu;
......@@ -46,7 +46,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL xsec_xmlsec_component_getFactory( const sal_
Reference< XInterface > xFactory ;
if( pImplName != nullptr ) {
#if GPGME_HAVE_GPGME
#if HAVE_FEATURE_GPGME
if( XMLSignature_GpgImpl::impl_getImplementationName().equalsAscii( pImplName ) )
{
xFactory = XMLSignature_GpgImpl::impl_createFactory( static_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment