gpg4libre: No need to create separate idl files for gpg services
Change-Id: Ief217cd91e30433c30ac0547d28fb6eab2dc43b0 Reviewed-on: https://gerrit.libreoffice.org/35213 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
This commit is contained in:
parent
e7391ca132
commit
9b6ed11d58
@ -463,13 +463,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,com/sun/star/xml/crypto,\
|
||||
SEInitializer \
|
||||
XMLSecurityContext \
|
||||
))
|
||||
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,com/sun/star/xml/crypto/gpg,\
|
||||
GpgSecurityEnvironment \
|
||||
GpgSEInitializer \
|
||||
GpgXMLEncryption \
|
||||
GpgXMLSecurityContext \
|
||||
GpgXMLSignature \
|
||||
))
|
||||
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,com/sun/star/xml/dom,\
|
||||
DocumentBuilder \
|
||||
SAXDocumentBuilder \
|
||||
|
@ -1,28 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/*
|
||||
* This file is part of the LibreOffice project.
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
#ifndef __com_sun_star_xml_crypto_gpg_GpgSecurityEnvironment_idl_
|
||||
#define __com_sun_star_xml_crypto_gpg_GpgSecurityEnvironment_idl_
|
||||
|
||||
#include <com/sun/star/xml/crypto/XSecurityEnvironment.idl>
|
||||
|
||||
module com { module sun { module star { module xml { module crypto { module gpg {
|
||||
|
||||
/**
|
||||
* Service implementing XSecurityEnvironment
|
||||
*
|
||||
* @since LibreOffice 5.4
|
||||
*/
|
||||
service GpgSecurityEnvironment : XSecurityEnvironment;
|
||||
|
||||
} ; } ; } ; } ; } ; } ;
|
||||
|
||||
#endif
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
@ -1,34 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/*
|
||||
* This file is part of the LibreOffice project.
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
#ifndef __com_sun_star_xml_crypto_gpg_GpgXMLEncryption_idl_
|
||||
#define __com_sun_star_xml_crypto_gpg_GpgXMLEncryption_idl_
|
||||
|
||||
#include <com/sun/star/uno/XInterface.idl>
|
||||
#include <com/sun/star/uno/Exception.idl>
|
||||
#include <com/sun/star/xml/crypto/XXMLEncryption.idl>
|
||||
#include <com/sun/star/lang/XInitialization.idl>
|
||||
|
||||
module com { module sun { module star { module xml { module crypto { module gpg {
|
||||
|
||||
/**
|
||||
* Service implementing XXMLEncryption
|
||||
*
|
||||
* @since LibreOffice 5.4
|
||||
*/
|
||||
service GpgXMLEncryption {
|
||||
interface com::sun::star::xml::crypto::XXMLEncryption ;
|
||||
interface com::sun::star::lang::XInitialization ;
|
||||
} ;
|
||||
|
||||
} ; } ; } ; } ; } ; } ;
|
||||
|
||||
#endif
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
@ -1,28 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/*
|
||||
* This file is part of the LibreOffice project.
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
#ifndef __com_sun_star_xml_crypto_gpg_GpgXMLSecurityContext_idl_
|
||||
#define __com_sun_star_xml_crypto_gpg_GpgXMLSecurityContext_idl_
|
||||
|
||||
#include <com/sun/star/xml/crypto/XXMLSecurityContext.idl>
|
||||
|
||||
module com { module sun { module star { module xml { module crypto { module gpg {
|
||||
|
||||
/**
|
||||
* Service implementing XXMLSecurityContext
|
||||
*
|
||||
* @since LibreOffice 5.4
|
||||
*/
|
||||
service GpgXMLSecurityContext : XXMLSecurityContext;
|
||||
|
||||
} ; } ; } ; } ; } ; } ;
|
||||
|
||||
#endif
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
@ -1,34 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/*
|
||||
* This file is part of the LibreOffice project.
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
#ifndef __com_sun_star_xml_crypto_gpg_GpgXmlSignature_idl_
|
||||
#define __com_sun_star_xml_crypto_gpg_GpgXmlSignature_idl_
|
||||
|
||||
#include <com/sun/star/uno/XInterface.idl>
|
||||
#include <com/sun/star/uno/Exception.idl>
|
||||
#include <com/sun/star/xml/crypto/XXMLSignature.idl>
|
||||
#include <com/sun/star/lang/XInitialization.idl>
|
||||
|
||||
module com { module sun { module star { module xml { module crypto { module gpg {
|
||||
|
||||
/**
|
||||
* Service implementing XXMLSignature
|
||||
*
|
||||
* @since LibreOffice 5.4
|
||||
*/
|
||||
service GpgXMLSignature {
|
||||
interface com::sun::star::xml::crypto::XXMLSignature ;
|
||||
interface com::sun::star::lang::XInitialization ;
|
||||
} ;
|
||||
|
||||
} ; } ; } ; } ; } ; } ;
|
||||
|
||||
#endif
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
@ -111,7 +111,6 @@ $(eval $(call gb_Rdb_add_components,services,\
|
||||
xmlscript/util/xmlscript \
|
||||
$(if $(ENABLE_NSS), \
|
||||
xmlsecurity/util/xmlsecurity \
|
||||
$(if $(filter-out WNT MACOSX ANDROID IOS,$(OS)),xmlsecurity/util/xsec_gpg) \
|
||||
xmlsecurity/util/xsec_xmlsec$(if $(filter WNT,$(OS)),.windows)) \
|
||||
$(if $(ENABLE_COINMP), \
|
||||
sccomp/source/solver/coinmpsolver \
|
||||
|
@ -9,8 +9,6 @@
|
||||
|
||||
$(eval $(call gb_Library_Library,xsec_gpg))
|
||||
|
||||
$(eval $(call gb_Library_set_componentfile,xsec_gpg,xmlsecurity/util/xsec_gpg))
|
||||
|
||||
$(eval $(call gb_Library_set_include,xsec_gpg,\
|
||||
$$(INCLUDE) \
|
||||
-I$(SRCDIR)/xmlsecurity/inc \
|
||||
@ -18,8 +16,7 @@ $(eval $(call gb_Library_set_include,xsec_gpg,\
|
||||
))
|
||||
|
||||
$(eval $(call gb_Library_add_defs,xsec_gpg,\
|
||||
-DXSECFW_DLLIMPLEMENTATION \
|
||||
-DXMLSEC_CRYPTO_GPG \
|
||||
-DXSECGPG_DLLIMPLEMENTATION \
|
||||
))
|
||||
|
||||
$(eval $(call gb_Library_use_custom_headers,xsec_gpg,\
|
||||
@ -47,7 +44,6 @@ $(eval $(call gb_Library_add_exception_objects,xsec_gpg,\
|
||||
xmlsecurity/source/gpg/CertificateImpl \
|
||||
xmlsecurity/source/gpg/CipherContext \
|
||||
xmlsecurity/source/gpg/DigestContext \
|
||||
xmlsecurity/source/gpg/GpgComponentFactory \
|
||||
xmlsecurity/source/gpg/SecurityEnvironment \
|
||||
xmlsecurity/source/gpg/SEInitializer \
|
||||
xmlsecurity/source/gpg/XMLEncryption \
|
||||
|
@ -16,12 +16,11 @@
|
||||
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
||||
#include <com/sun/star/xml/crypto/XXMLSecurityContext.hpp>
|
||||
#include <com/sun/star/xml/crypto/XSEInitializer.hpp>
|
||||
#include <com/sun/star/lang/XServiceInfo.hpp>
|
||||
|
||||
#include <xsecgpgdllapi.h>
|
||||
#include <cppuhelper/implbase.hxx>
|
||||
|
||||
class SEInitializerGpg : public cppu::WeakImplHelper< css::xml::crypto::XSEInitializer,
|
||||
css::lang::XServiceInfo >
|
||||
class XSECGPG_DLLPUBLIC SEInitializerGpg : public cppu::WeakImplHelper< css::xml::crypto::XSEInitializer >
|
||||
{
|
||||
protected:
|
||||
css::uno::Reference< css::uno::XComponentContext > m_xContext;
|
||||
@ -36,22 +35,8 @@ public:
|
||||
|
||||
virtual void SAL_CALL freeSecurityContext( const css::uno::Reference<
|
||||
css::xml::crypto::XXMLSecurityContext >& securityContext ) override;
|
||||
|
||||
/* XServiceInfo */
|
||||
virtual OUString SAL_CALL getImplementationName() override;
|
||||
|
||||
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
|
||||
|
||||
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
|
||||
};
|
||||
|
||||
OUString SEInitializer_getImplementationName();
|
||||
|
||||
css::uno::Sequence< OUString > SAL_CALL SEInitializer_getSupportedServiceNames();
|
||||
|
||||
css::uno::Reference< css::uno::XInterface > SAL_CALL SEInitializer_createInstance(
|
||||
const css::uno::Reference< css::lang::XMultiServiceFactory > & rxMSF);
|
||||
|
||||
#endif
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
@ -7,22 +7,17 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
#ifndef __com_sun_star_xml_crypto_gpg_GpgSEInitializer_idl_
|
||||
#define __com_sun_star_xml_crypto_gpg_GpgSEInitializer_idl_
|
||||
#ifndef INCLUDED_XMLSECURITY_INC_XSECGPGDLLAPI_H
|
||||
#define INCLUDED_XMLSECURITY_INC_XSECGPGDLLAPI_H
|
||||
|
||||
#include <com/sun/star/xml/crypto/XSEInitializer.idl>
|
||||
|
||||
module com { module sun { module star { module xml { module crypto { module gpg {
|
||||
|
||||
/**
|
||||
* Service implementing XSEInitializer
|
||||
*
|
||||
* @since LibreOffice 5.4
|
||||
*/
|
||||
service GpgSEInitializer : XSEInitializer;
|
||||
|
||||
} ; } ; } ; } ; } ; } ;
|
||||
#include <sal/types.h>
|
||||
|
||||
#if defined(XSECGPG_DLLIMPLEMENTATION)
|
||||
#define XSECGPG_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
|
||||
#else
|
||||
#define XSECGPG_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
|
||||
#endif
|
||||
|
||||
#endif // INCLUDED_XMLSECURITY_INC_XSECGPGDLLAPI_H
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
@ -1,70 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/*
|
||||
* This file is part of the LibreOffice project.
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
#include "SecurityEnvironment.hxx"
|
||||
#include "SEInitializer.hxx"
|
||||
#include "XMLSignature.hxx"
|
||||
#include "XMLEncryption.hxx"
|
||||
#include "XMLSecurityContext.hxx"
|
||||
|
||||
#include <cppuhelper/factory.hxx>
|
||||
|
||||
using namespace cppu;
|
||||
using namespace css::uno;
|
||||
using namespace css::lang;
|
||||
using namespace css::registry;
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
SAL_DLLPUBLIC_EXPORT void* SAL_CALL xsec_gpg_component_getFactory( const sal_Char* pImplName , void* pServiceManager , void* /*pRegistryKey*/ )
|
||||
{
|
||||
void* pRet = nullptr;
|
||||
Reference< XSingleServiceFactory > xFactory ;
|
||||
|
||||
if( pImplName != nullptr && pServiceManager != nullptr )
|
||||
{
|
||||
#ifdef XMLSEC_CRYPTO_GPG
|
||||
if( SEInitializer_getImplementationName().equalsAscii( pImplName ) )
|
||||
{
|
||||
xFactory.set( createSingleFactory(
|
||||
static_cast< XMultiServiceFactory * >( pServiceManager ),
|
||||
OUString::createFromAscii( pImplName ),
|
||||
SEInitializer_createInstance, SEInitializer_getSupportedServiceNames() ) );
|
||||
}
|
||||
else if( XMLSignatureGpg::impl_getImplementationName().equalsAscii( pImplName ) )
|
||||
{
|
||||
xFactory = XMLSignatureGpg::impl_createFactory( static_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
|
||||
}
|
||||
else if( XMLSecurityContextGpg::impl_getImplementationName().equalsAscii( pImplName ) )
|
||||
{
|
||||
xFactory = XMLSecurityContextGpg::impl_createFactory( static_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
|
||||
}
|
||||
else if( SecurityEnvironmentGpg::impl_getImplementationName().equalsAscii( pImplName ) )
|
||||
{
|
||||
xFactory = SecurityEnvironmentGpg::impl_createFactory( static_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
|
||||
}
|
||||
else if( XMLEncryptionGpg::impl_getImplementationName().equalsAscii( pImplName ) )
|
||||
{
|
||||
xFactory = XMLEncryptionGpg::impl_createFactory( static_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if( xFactory.is() ) {
|
||||
xFactory->acquire() ;
|
||||
pRet = xFactory.get() ;
|
||||
}
|
||||
|
||||
return pRet ;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
@ -7,14 +7,10 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
#include "SEInitializer.hxx"
|
||||
#include "gpg/SEInitializer.hxx"
|
||||
#include "SecurityEnvironment.hxx"
|
||||
#include "XMLSecurityContext.hxx"
|
||||
|
||||
#include <comphelper/processfactory.hxx>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
|
||||
#include <com/sun/star/xml/crypto/gpg/GpgSecurityEnvironment.hpp>
|
||||
#include <com/sun/star/xml/crypto/gpg/GpgXMLSecurityContext.hpp>
|
||||
|
||||
using namespace css;
|
||||
using namespace css::lang;
|
||||
@ -37,11 +33,9 @@ Reference< XXMLSecurityContext > SAL_CALL SEInitializerGpg::createSecurityContex
|
||||
try
|
||||
{
|
||||
/* Build XML Security Context */
|
||||
Reference< XXMLSecurityContext > xSecCtx = xml::crypto::gpg::GpgXMLSecurityContext::create(m_xContext);
|
||||
|
||||
Reference< XSecurityEnvironment > xSecEnv = xml::crypto::gpg::GpgSecurityEnvironment::create(m_xContext);
|
||||
Reference< XUnoTunnel > xSecEnvTunnel(xSecEnv, uno::UNO_QUERY_THROW);
|
||||
Reference< XXMLSecurityContext > xSecCtx(new XMLSecurityContextGpg());
|
||||
|
||||
Reference< XSecurityEnvironment > xSecEnv(new SecurityEnvironmentGpg());
|
||||
sal_Int32 n = xSecCtx->addSecurityEnvironment(xSecEnv);
|
||||
//originally the SecurityEnvironment with the internal slot was set as default
|
||||
xSecCtx->setDefaultSecurityEnvironmentIndex( n );
|
||||
@ -57,35 +51,4 @@ void SAL_CALL SEInitializerGpg::freeSecurityContext( const uno::Reference< XXMLS
|
||||
{
|
||||
}
|
||||
|
||||
OUString SEInitializer_getImplementationName()
|
||||
{
|
||||
return OUString("com.sun.star.xml.security.SEInitializer_Gpg");
|
||||
}
|
||||
|
||||
uno::Sequence< OUString > SAL_CALL SEInitializer_getSupportedServiceNames()
|
||||
{
|
||||
return {"com.sun.star.xml.crypto.gpg.GpgSEInitializer"};
|
||||
}
|
||||
|
||||
uno::Reference< uno::XInterface > SAL_CALL SEInitializer_createInstance( const uno::Reference< lang::XMultiServiceFactory > & rxMSF)
|
||||
{
|
||||
return static_cast<cppu::OWeakObject*>(new SEInitializerGpg(comphelper::getComponentContext(rxMSF)));
|
||||
}
|
||||
|
||||
/* XServiceInfo */
|
||||
OUString SAL_CALL SEInitializerGpg::getImplementationName()
|
||||
{
|
||||
return SEInitializer_getImplementationName();
|
||||
}
|
||||
|
||||
sal_Bool SAL_CALL SEInitializerGpg::supportsService( const OUString& rServiceName )
|
||||
{
|
||||
return cppu::supportsService(this, rServiceName);
|
||||
}
|
||||
|
||||
uno::Sequence< OUString > SAL_CALL SEInitializerGpg::getSupportedServiceNames()
|
||||
{
|
||||
return SEInitializer_getSupportedServiceNames();
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@ -32,45 +32,6 @@ SecurityEnvironmentGpg::~SecurityEnvironmentGpg()
|
||||
{
|
||||
}
|
||||
|
||||
/* XServiceInfo */
|
||||
OUString SAL_CALL SecurityEnvironmentGpg::getImplementationName()
|
||||
{
|
||||
return impl_getImplementationName();
|
||||
}
|
||||
|
||||
/* XServiceInfo */
|
||||
sal_Bool SAL_CALL SecurityEnvironmentGpg::supportsService(const OUString& serviceName)
|
||||
{
|
||||
return cppu::supportsService(this, serviceName);
|
||||
}
|
||||
|
||||
/* XServiceInfo */
|
||||
Sequence< OUString > SAL_CALL SecurityEnvironmentGpg::getSupportedServiceNames()
|
||||
{
|
||||
return impl_getSupportedServiceNames() ;
|
||||
}
|
||||
|
||||
//Helper for XServiceInfo
|
||||
Sequence< OUString > SecurityEnvironmentGpg::impl_getSupportedServiceNames()
|
||||
{
|
||||
return { "com.sun.star.xml.crypto.gpg.GpgSecurityEnvironment" } ;
|
||||
}
|
||||
|
||||
OUString SecurityEnvironmentGpg::impl_getImplementationName()
|
||||
{
|
||||
return OUString("com.sun.star.xml.security.SecurityEnvironment_Gpg");
|
||||
}
|
||||
|
||||
//Helper for registry
|
||||
Reference< XInterface > SAL_CALL SecurityEnvironmentGpg::impl_createInstance( const Reference< XMultiServiceFactory >& )
|
||||
{
|
||||
return Reference< XInterface >( *new SecurityEnvironmentGpg ) ;
|
||||
}
|
||||
|
||||
Reference< XSingleServiceFactory > SecurityEnvironmentGpg::impl_createFactory( const Reference< XMultiServiceFactory >& aServiceManager ) {
|
||||
return ::cppu::createSingleFactory( aServiceManager , impl_getImplementationName() , impl_createInstance , impl_getSupportedServiceNames() ) ;
|
||||
}
|
||||
|
||||
/* XUnoTunnel */
|
||||
sal_Int64 SAL_CALL SecurityEnvironmentGpg::getSomething( const Sequence< sal_Int8 >& aIdentifier )
|
||||
{
|
||||
|
@ -17,8 +17,6 @@
|
||||
#include <com/sun/star/uno/Exception.hpp>
|
||||
|
||||
#include <com/sun/star/uno/Reference.hxx>
|
||||
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
|
||||
#include <com/sun/star/lang/XServiceInfo.hpp>
|
||||
#include <com/sun/star/uno/SecurityException.hpp>
|
||||
#include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp>
|
||||
#include <com/sun/star/security/XCertificate.hpp>
|
||||
@ -28,7 +26,6 @@
|
||||
|
||||
|
||||
class SecurityEnvironmentGpg : public cppu::WeakImplHelper< css::xml::crypto::XSecurityEnvironment,
|
||||
css::lang::XServiceInfo,
|
||||
css::lang::XUnoTunnel >
|
||||
{
|
||||
public:
|
||||
@ -36,24 +33,6 @@ public:
|
||||
virtual ~SecurityEnvironmentGpg() override;
|
||||
|
||||
//Methods from XSecurityEnvironment
|
||||
|
||||
//Methods from XServiceInfo
|
||||
virtual OUString SAL_CALL getImplementationName() override;
|
||||
|
||||
virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
|
||||
|
||||
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
|
||||
|
||||
//Helper for XServiceInfo
|
||||
static css::uno::Sequence< OUString > impl_getSupportedServiceNames() ;
|
||||
|
||||
static OUString impl_getImplementationName();
|
||||
|
||||
//Helper for registry
|
||||
static css::uno::Reference< css::uno::XInterface > SAL_CALL impl_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory >& aServiceManager);
|
||||
|
||||
static css::uno::Reference< css::lang::XSingleServiceFactory > impl_createFactory( const css::uno::Reference< css::lang::XMultiServiceFactory >& aServiceManager ) ;
|
||||
|
||||
virtual ::sal_Int32 SAL_CALL verifyCertificate(
|
||||
const css::uno::Reference<
|
||||
css::security::XCertificate >& xCert,
|
||||
|
@ -9,8 +9,6 @@
|
||||
|
||||
#include "XMLEncryption.hxx"
|
||||
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
|
||||
using namespace css::uno;
|
||||
using namespace css::lang;
|
||||
using namespace css::xml::wrapper;
|
||||
@ -36,44 +34,4 @@ Reference< XXMLEncryptionTemplate > SAL_CALL XMLEncryptionGpg::decrypt(const Ref
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
/* XServiceInfo */
|
||||
OUString SAL_CALL XMLEncryptionGpg::getImplementationName()
|
||||
{
|
||||
return impl_getImplementationName() ;
|
||||
}
|
||||
|
||||
/* XServiceInfo */
|
||||
sal_Bool SAL_CALL XMLEncryptionGpg::supportsService(const OUString& serviceName)
|
||||
{
|
||||
return cppu::supportsService(this, serviceName);
|
||||
}
|
||||
|
||||
/* XServiceInfo */
|
||||
Sequence< OUString > SAL_CALL XMLEncryptionGpg::getSupportedServiceNames()
|
||||
{
|
||||
return impl_getSupportedServiceNames() ;
|
||||
}
|
||||
|
||||
//Helper for XServiceInfo
|
||||
Sequence< OUString > XMLEncryptionGpg::impl_getSupportedServiceNames()
|
||||
{
|
||||
return {"com.sun.star.xml.crypto.gpg.GpgXMLEncryption"};
|
||||
}
|
||||
|
||||
OUString XMLEncryptionGpg::impl_getImplementationName()
|
||||
{
|
||||
return OUString("com.sun.star.xml.security.XMLEncryption_Gpg");
|
||||
}
|
||||
|
||||
//Helper for registry
|
||||
Reference< XInterface > SAL_CALL XMLEncryptionGpg::impl_createInstance( const Reference< XMultiServiceFactory >& )
|
||||
{
|
||||
return Reference< XInterface >(*new XMLEncryptionGpg);
|
||||
}
|
||||
|
||||
Reference< XSingleServiceFactory > XMLEncryptionGpg::impl_createFactory( const Reference< XMultiServiceFactory >& aServiceManager )
|
||||
{
|
||||
return ::cppu::createSingleFactory(aServiceManager, impl_getImplementationName(), impl_createInstance, impl_getSupportedServiceNames());
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@ -12,20 +12,16 @@
|
||||
|
||||
#include <sal/config.h>
|
||||
#include <rtl/ustring.hxx>
|
||||
#include <cppuhelper/factory.hxx>
|
||||
#include <cppuhelper/implbase.hxx>
|
||||
#include <com/sun/star/uno/Exception.hpp>
|
||||
|
||||
#include <com/sun/star/uno/Reference.hxx>
|
||||
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
|
||||
#include <com/sun/star/lang/XServiceInfo.hpp>
|
||||
#include <com/sun/star/xml/crypto/XXMLEncryption.hpp>
|
||||
#include <com/sun/star/xml/crypto/XXMLEncryptionTemplate.hpp>
|
||||
#include <com/sun/star/xml/crypto/XXMLSecurityContext.hpp>
|
||||
#include <com/sun/star/xml/crypto/XMLEncryptionException.hpp>
|
||||
|
||||
class XMLEncryptionGpg : public cppu::WeakImplHelper< css::xml::crypto::XXMLEncryption,
|
||||
css::lang::XServiceInfo >
|
||||
class XMLEncryptionGpg : public cppu::WeakImplHelper< css::xml::crypto::XXMLEncryption >
|
||||
{
|
||||
public:
|
||||
explicit XMLEncryptionGpg();
|
||||
@ -39,26 +35,7 @@ public:
|
||||
virtual css::uno::Reference< css::xml::crypto::XXMLEncryptionTemplate > SAL_CALL decrypt(
|
||||
const css::uno::Reference< css::xml::crypto::XXMLEncryptionTemplate >& aTemplate,
|
||||
const css::uno::Reference< css::xml::crypto::XXMLSecurityContext >& aContext) override;
|
||||
|
||||
// XServiceInfo
|
||||
virtual OUString SAL_CALL getImplementationName() override;
|
||||
|
||||
virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
|
||||
|
||||
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
|
||||
|
||||
// Helper for XServiceInfo
|
||||
static css::uno::Sequence< OUString > impl_getSupportedServiceNames();
|
||||
|
||||
static OUString impl_getImplementationName();
|
||||
|
||||
// Helper for registry
|
||||
static css::uno::Reference< css::uno::XInterface > SAL_CALL impl_createInstance(
|
||||
const css::uno::Reference< css::lang::XMultiServiceFactory >& aServiceManager);
|
||||
|
||||
static css::uno::Reference< css::lang::XSingleServiceFactory > impl_createFactory(
|
||||
const css::uno::Reference< css::lang::XMultiServiceFactory >& aServiceManager);
|
||||
} ;
|
||||
};
|
||||
|
||||
#endif // INCLUDED_XMLSECURITY_SOURCE_GPG_XMLENCRYPTION_HXX
|
||||
|
||||
|
@ -10,8 +10,6 @@
|
||||
#include "XMLSecurityContext.hxx"
|
||||
#include "SecurityEnvironment.hxx"
|
||||
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
|
||||
using namespace css::uno;
|
||||
using namespace css::lang;
|
||||
using namespace css::xml::crypto;
|
||||
@ -67,45 +65,4 @@ void SAL_CALL XMLSecurityContextGpg::setDefaultSecurityEnvironmentIndex(sal_Int3
|
||||
m_nDefaultEnvIndex = nDefaultEnvIndex;
|
||||
}
|
||||
|
||||
/* XServiceInfo */
|
||||
OUString SAL_CALL XMLSecurityContextGpg::getImplementationName()
|
||||
{
|
||||
return impl_getImplementationName() ;
|
||||
}
|
||||
|
||||
/* XServiceInfo */
|
||||
sal_Bool SAL_CALL XMLSecurityContextGpg::supportsService( const OUString& serviceName)
|
||||
{
|
||||
return cppu::supportsService(this, serviceName);
|
||||
}
|
||||
|
||||
/* XServiceInfo */
|
||||
Sequence< OUString > SAL_CALL XMLSecurityContextGpg::getSupportedServiceNames()
|
||||
{
|
||||
return impl_getSupportedServiceNames() ;
|
||||
}
|
||||
|
||||
//Helper for XServiceInfo
|
||||
Sequence< OUString > XMLSecurityContextGpg::impl_getSupportedServiceNames()
|
||||
{
|
||||
return {"com.sun.star.xml.crypto.gpg.GpgXMLSecurityContext"};
|
||||
}
|
||||
|
||||
OUString XMLSecurityContextGpg::impl_getImplementationName()
|
||||
{
|
||||
return OUString("com.sun.star.xml.security.XMLSecurityContext_Gpg");
|
||||
}
|
||||
|
||||
//Helper for registry
|
||||
Reference< XInterface > SAL_CALL XMLSecurityContextGpg::impl_createInstance( const Reference< XMultiServiceFactory >& )
|
||||
{
|
||||
return Reference< XInterface >( *new XMLSecurityContextGpg ) ;
|
||||
}
|
||||
|
||||
Reference< XSingleServiceFactory > XMLSecurityContextGpg::impl_createFactory( const Reference< XMultiServiceFactory >& aServiceManager )
|
||||
{
|
||||
return ::cppu::createSingleFactory( aServiceManager , impl_getImplementationName() , impl_createInstance , impl_getSupportedServiceNames() ) ;
|
||||
}
|
||||
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@ -26,8 +26,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
class XMLSecurityContextGpg : public cppu::WeakImplHelper< css::xml::crypto::XXMLSecurityContext,
|
||||
css::lang::XServiceInfo >
|
||||
class XMLSecurityContextGpg : public cppu::WeakImplHelper< css::xml::crypto::XXMLSecurityContext >
|
||||
{
|
||||
private:
|
||||
std::vector< css::uno::Reference< css::xml::crypto::XSecurityEnvironment > > m_vSecurityEnvironments;
|
||||
@ -35,7 +34,7 @@ private:
|
||||
sal_Int32 m_nDefaultEnvIndex;
|
||||
|
||||
public:
|
||||
XMLSecurityContextGpg() ;
|
||||
XMLSecurityContextGpg();
|
||||
virtual ~XMLSecurityContextGpg() override;
|
||||
|
||||
// XXMLSecurityContext
|
||||
@ -51,25 +50,6 @@ public:
|
||||
virtual sal_Int32 SAL_CALL getDefaultSecurityEnvironmentIndex() override;
|
||||
|
||||
virtual void SAL_CALL setDefaultSecurityEnvironmentIndex( sal_Int32 nDefaultEnvIndex ) override;
|
||||
|
||||
// XServiceInfo
|
||||
virtual OUString SAL_CALL getImplementationName() override;
|
||||
|
||||
virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
|
||||
|
||||
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
|
||||
|
||||
// XServiceInfo
|
||||
static css::uno::Sequence< OUString > impl_getSupportedServiceNames();
|
||||
|
||||
static OUString impl_getImplementationName();
|
||||
|
||||
//Helper for registry
|
||||
static css::uno::Reference< css::uno::XInterface > SAL_CALL impl_createInstance(
|
||||
const css::uno::Reference< css::lang::XMultiServiceFactory >& aServiceManager);
|
||||
|
||||
static css::uno::Reference< css::lang::XSingleServiceFactory > impl_createFactory(
|
||||
const css::uno::Reference< css::lang::XMultiServiceFactory >& aServiceManager);
|
||||
} ;
|
||||
|
||||
#endif // INCLUDED_XMLSECURITY_SOURCE_GPG_XMLSECURITYCONTEXT_HXX
|
||||
|
@ -40,44 +40,4 @@ Reference< XXMLSignatureTemplate > SAL_CALL XMLSignatureGpg::validate(const Refe
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
/* XServiceInfo */
|
||||
OUString SAL_CALL XMLSignatureGpg::getImplementationName()
|
||||
{
|
||||
return impl_getImplementationName() ;
|
||||
}
|
||||
|
||||
/* XServiceInfo */
|
||||
sal_Bool SAL_CALL XMLSignatureGpg::supportsService( const OUString& serviceName)
|
||||
{
|
||||
return cppu::supportsService(this, serviceName);
|
||||
}
|
||||
|
||||
/* XServiceInfo */
|
||||
Sequence< OUString > SAL_CALL XMLSignatureGpg::getSupportedServiceNames()
|
||||
{
|
||||
return impl_getSupportedServiceNames() ;
|
||||
}
|
||||
|
||||
//Helper for XServiceInfo
|
||||
Sequence< OUString > XMLSignatureGpg::impl_getSupportedServiceNames()
|
||||
{
|
||||
return {"com.sun.star.xml.crypto.gpg.GpgXMLSignature"};
|
||||
}
|
||||
|
||||
OUString XMLSignatureGpg::impl_getImplementationName()
|
||||
{
|
||||
return OUString("com.sun.star.xml.security.XMLSignature_Gpg");
|
||||
}
|
||||
|
||||
//Helper for registry
|
||||
Reference< XInterface > SAL_CALL XMLSignatureGpg::impl_createInstance( const Reference< XMultiServiceFactory >& )
|
||||
{
|
||||
return Reference< XInterface >( *new XMLSignatureGpg ) ;
|
||||
}
|
||||
|
||||
Reference< XSingleServiceFactory > XMLSignatureGpg::impl_createFactory( const Reference< XMultiServiceFactory >& aServiceManager )
|
||||
{
|
||||
return cppu::createSingleFactory( aServiceManager , impl_getImplementationName() , impl_createInstance , impl_getSupportedServiceNames() ) ;
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@ -12,20 +12,16 @@
|
||||
|
||||
#include <sal/config.h>
|
||||
#include <rtl/ustring.hxx>
|
||||
#include <cppuhelper/factory.hxx>
|
||||
#include <cppuhelper/implbase.hxx>
|
||||
#include <com/sun/star/uno/Exception.hpp>
|
||||
|
||||
#include <com/sun/star/uno/Reference.hxx>
|
||||
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
|
||||
#include <com/sun/star/lang/XServiceInfo.hpp>
|
||||
#include <com/sun/star/xml/crypto/XXMLSignature.hpp>
|
||||
#include <com/sun/star/xml/crypto/XXMLSignatureTemplate.hpp>
|
||||
#include <com/sun/star/xml/crypto/XXMLSecurityContext.hpp>
|
||||
#include <com/sun/star/xml/crypto/XMLSignatureException.hpp>
|
||||
|
||||
class XMLSignatureGpg : public cppu::WeakImplHelper< css::xml::crypto::XXMLSignature,
|
||||
css::lang::XServiceInfo >
|
||||
class XMLSignatureGpg : public cppu::WeakImplHelper< css::xml::crypto::XXMLSignature >
|
||||
{
|
||||
public:
|
||||
explicit XMLSignatureGpg();
|
||||
@ -41,26 +37,7 @@ public:
|
||||
const css::uno::Reference< css::xml::crypto::XXMLSignatureTemplate >& aTemplate ,
|
||||
const css::uno::Reference< css::xml::crypto::XXMLSecurityContext >& aContext
|
||||
) override;
|
||||
|
||||
// XServiceInfo
|
||||
virtual OUString SAL_CALL getImplementationName() override;
|
||||
|
||||
virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
|
||||
|
||||
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
|
||||
|
||||
// Helper for XServiceInfo
|
||||
static css::uno::Sequence< OUString > impl_getSupportedServiceNames() ;
|
||||
|
||||
static OUString impl_getImplementationName();
|
||||
|
||||
//Helper for registry
|
||||
static css::uno::Reference< css::uno::XInterface > SAL_CALL impl_createInstance(
|
||||
const css::uno::Reference< css::lang::XMultiServiceFactory >& aServiceManager);
|
||||
|
||||
static css::uno::Reference< css::lang::XSingleServiceFactory > impl_createFactory(
|
||||
const css::uno::Reference< css::lang::XMultiServiceFactory >& aServiceManager);
|
||||
} ;
|
||||
};
|
||||
|
||||
#endif // INCLUDED_XMLSECURITY_SOURCE_XMLSEC_GPG_XMLSIGNATURE_HXX
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
#include <documentsignaturemanager.hxx>
|
||||
#include "gpg/SEInitializer.hxx"
|
||||
|
||||
#include <com/sun/star/embed/StorageFormats.hpp>
|
||||
#include <com/sun/star/embed/ElementModes.hpp>
|
||||
@ -25,7 +26,6 @@
|
||||
#include <com/sun/star/io/XTruncate.hpp>
|
||||
#include <com/sun/star/embed/XTransactedObject.hpp>
|
||||
#include <com/sun/star/xml/crypto/SEInitializer.hpp>
|
||||
#include <com/sun/star/xml/crypto/gpg/GpgSEInitializer.hpp>
|
||||
|
||||
#include <comphelper/storagehelper.hxx>
|
||||
#include <rtl/ustrbuf.hxx>
|
||||
@ -56,7 +56,7 @@ bool DocumentSignatureManager::init()
|
||||
|
||||
mxSEInitializer = xml::crypto::SEInitializer::create(mxContext);
|
||||
#if !defined(MACOSX) && !defined(WNT)
|
||||
mxGpgSEInitializer = xml::crypto::gpg::GpgSEInitializer::create(mxContext);
|
||||
mxGpgSEInitializer.set(new SEInitializerGpg(mxContext));
|
||||
#endif
|
||||
|
||||
if (mxSEInitializer.is())
|
||||
|
@ -1,36 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* This file is part of the LibreOffice project.
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
-->
|
||||
|
||||
<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
|
||||
prefix="xsec_gpg" xmlns="http://openoffice.org/2010/uno-components">
|
||||
<implementation name="com.sun.star.xml.security.SEInitializer_Gpg">
|
||||
<service name="com.sun.star.xml.crypto.gpg.GpgSEInitializer"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.xml.security.SecurityEnvironment_Gpg">
|
||||
<service name="com.sun.star.xml.crypto.gpg.GpgSecurityEnvironment"/>
|
||||
</implementation>
|
||||
<!-- TODO Not implemented yet
|
||||
<implementation name="com.sun.star.xml.security.XMLDocumentWrapper_Gpg">
|
||||
<service name="com.sun.star.xml.wrapper.XMLDocumentWrapper"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.xml.security.XMLElementWrapper_Gpg">
|
||||
<service name="com.sun.star.xml.wrapper.XMLElementWrapper"/>
|
||||
</implementation>-->
|
||||
<implementation name="com.sun.star.xml.security.XMLEncryption_Gpg">
|
||||
<service name="com.sun.star.xml.crypto.gpg.GpgXMLEncryption"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.xml.security.XMLSecurityContext_Gpg">
|
||||
<service name="com.sun.star.xml.crypto.gpg.GpgXMLSecurityContext"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.xml.security.XMLSignature_Gpg">
|
||||
<service name="com.sun.star.xml.crypto.gpg.GpgXMLSignature"/>
|
||||
</implementation>-->
|
||||
</component>
|
||||
|
Loading…
x
Reference in New Issue
Block a user