diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-08-03 09:08:07 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-08-03 09:54:42 +0200 |
commit | 166f13ef65b4a0eb9927eff2ffe5bac319785ee7 (patch) | |
tree | ab5cc85e00e6ed0499bde00d09f60b7dc5875294 | |
parent | 1a68c13518a4fd7e87098dccf4e1df3b36b57469 (diff) |
xmlsecurity: remove unused XMLEncryption_MSCryptImpl
This is unused since commit 2303d4f1a2b7e25fe864323adeec398057cebe72
([API CHANGE] offapi: remove unused css.xml.crypto.XMLEncryption,
2017-07-18).
Change-Id: Icaf5054f13271a9040137f305bd7be40d1be6600
Reviewed-on: https://gerrit.libreoffice.org/40699
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
6 files changed, 0 insertions, 519 deletions
diff --git a/xmlsecurity/Library_xsec_xmlsec.mk b/xmlsecurity/Library_xsec_xmlsec.mk index 81c0e42043b8..d7526d6af269 100644 --- a/xmlsecurity/Library_xsec_xmlsec.mk +++ b/xmlsecurity/Library_xsec_xmlsec.mk @@ -115,7 +115,6 @@ $(eval $(call gb_Library_add_exception_objects,xsec_xmlsec,\ xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl \ xmlsecurity/source/xmlsec/mscrypt/seinitializer_mscryptimpl \ xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl \ - xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl \ xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl \ xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl \ xmlsecurity/source/xmlsec/mscrypt/xsec_mscrypt \ diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx deleted file mode 100644 index 32fa51fa8c7b..000000000000 --- a/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx +++ /dev/null @@ -1,349 +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/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include <sal/config.h> - -#include <com/sun/star/xml/crypto/XMLEncryptionException.hpp> -#include <rtl/uuid.h> -#include "xmlencryption_mscryptimpl.hxx" - -#include "xmlsec/xmldocumentwrapper_xmlsecimpl.hxx" -#include "xmlsec/xmlelementwrapper_xmlsecimpl.hxx" -#include "xmlsec/errorcallback.hxx" - -#include "securityenvironment_mscryptimpl.hxx" - -#include "xmlsec-wrapper.h" - -#ifdef UNX -#define stricmp strcasecmp -#endif - -using namespace ::com::sun::star::uno ; -using namespace ::com::sun::star::lang ; -using ::com::sun::star::lang::XMultiServiceFactory ; -using ::com::sun::star::lang::XSingleServiceFactory ; - -using ::com::sun::star::xml::wrapper::XXMLElementWrapper ; -using ::com::sun::star::xml::wrapper::XXMLDocumentWrapper ; -using ::com::sun::star::xml::crypto::XSecurityEnvironment ; -using ::com::sun::star::xml::crypto::XXMLEncryption ; -using ::com::sun::star::xml::crypto::XXMLEncryptionTemplate ; -using ::com::sun::star::xml::crypto::XXMLSecurityContext ; -using ::com::sun::star::xml::crypto::XMLEncryptionException ; - -XMLEncryption_MSCryptImpl::XMLEncryption_MSCryptImpl( const Reference< XMultiServiceFactory >& aFactory ) : m_xServiceManager( aFactory ) { -} - -XMLEncryption_MSCryptImpl::~XMLEncryption_MSCryptImpl() { -} - -/* XXMLEncryption */ -Reference< XXMLEncryptionTemplate > -SAL_CALL XMLEncryption_MSCryptImpl::encrypt( - const Reference< XXMLEncryptionTemplate >& aTemplate , - const Reference< XSecurityEnvironment >& aEnvironment -) -{ - xmlSecKeysMngrPtr pMngr = nullptr ; - xmlSecEncCtxPtr pEncCtx = nullptr ; - xmlNodePtr pEncryptedData = nullptr ; - xmlNodePtr pContent = nullptr ; - - if( !aTemplate.is() ) - throw RuntimeException() ; - - if( !aEnvironment.is() ) - throw RuntimeException() ; - - //Get Keys Manager - Reference< XUnoTunnel > xSecTunnel( aEnvironment , UNO_QUERY_THROW ) ; - SecurityEnvironment_MSCryptImpl* pSecEnv = reinterpret_cast<SecurityEnvironment_MSCryptImpl*>(xSecTunnel->getSomething( SecurityEnvironment_MSCryptImpl::getUnoTunnelId() )); - if( pSecEnv == nullptr ) - throw RuntimeException() ; - - //Get the encryption template - Reference< XXMLElementWrapper > xTemplate = aTemplate->getTemplate() ; - if( !xTemplate.is() ) { - throw RuntimeException() ; - } - - Reference< XUnoTunnel > xTplTunnel( xTemplate , UNO_QUERY_THROW ) ; - XMLElementWrapper_XmlSecImpl* pTemplate = reinterpret_cast<XMLElementWrapper_XmlSecImpl*>(xTplTunnel->getSomething( XMLElementWrapper_XmlSecImpl::getUnoTunnelImplementationId() )); - if( pTemplate == nullptr ) { - throw RuntimeException() ; - } - - pEncryptedData = pTemplate->getNativeElement() ; - - //Find the element to be encrypted. - //This element is wrapped in the CipherValue sub-element. - xmlNodePtr pCipherData = pEncryptedData->children; - while (pCipherData != nullptr && stricmp(reinterpret_cast<const char *>(pCipherData->name), "CipherData")) - { - pCipherData = pCipherData->next; - } - - if( pCipherData == nullptr ) { - throw XMLEncryptionException() ; - } - - xmlNodePtr pCipherValue = pCipherData->children; - while (pCipherValue != nullptr && stricmp(reinterpret_cast<const char *>(pCipherValue->name), "CipherValue")) - { - pCipherValue = pCipherValue->next; - } - - if( pCipherValue == nullptr ) { - throw XMLEncryptionException() ; - } - - pContent = pCipherValue->children; - - if( pContent == nullptr ) { - throw XMLEncryptionException() ; - } - - xmlUnlinkNode(pContent); - xmlAddNextSibling(pEncryptedData, pContent); - - //remember the position of the element to be signed - bool isParentRef = true; - xmlNodePtr pParent = pEncryptedData->parent; - xmlNodePtr referenceNode; - - if (pEncryptedData == pParent->children) - { - referenceNode = pParent; - } - else - { - referenceNode = pEncryptedData->prev; - isParentRef = false; - } - - setErrorRecorder( ); - - pMngr = pSecEnv->createKeysManager(); - if( !pMngr ) { - throw RuntimeException() ; - } - - //Create Encryption context - pEncCtx = xmlSecEncCtxCreate( pMngr ) ; - if( pEncCtx == nullptr ) - { - SecurityEnvironment_MSCryptImpl::destroyKeysManager( pMngr ); - //throw XMLEncryptionException() ; - clearErrorRecorder(); - return aTemplate; - } - - //Encrypt the template - if( xmlSecEncCtxXmlEncrypt( pEncCtx , pEncryptedData , pContent ) < 0 ) { - aTemplate->setStatus(css::xml::crypto::SecurityOperationStatus_UNKNOWN); - xmlSecEncCtxDestroy( pEncCtx ) ; - SecurityEnvironment_MSCryptImpl::destroyKeysManager( pMngr ); - clearErrorRecorder(); - return aTemplate; - } - aTemplate->setStatus(css::xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED); - xmlSecEncCtxDestroy( pEncCtx ) ; - SecurityEnvironment_MSCryptImpl::destroyKeysManager( pMngr ); - - //get the new EncryptedData element - if (isParentRef) - { - pTemplate->setNativeElement(referenceNode->children) ; - } - else - { - pTemplate->setNativeElement(referenceNode->next); - } - - clearErrorRecorder(); - return aTemplate ; -} - -/* XXMLEncryption */ -Reference< XXMLEncryptionTemplate > SAL_CALL -XMLEncryption_MSCryptImpl::decrypt( - const Reference< XXMLEncryptionTemplate >& aTemplate , - const Reference< XXMLSecurityContext >& aSecurityCtx -) { - xmlSecKeysMngrPtr pMngr = nullptr ; - xmlSecEncCtxPtr pEncCtx = nullptr ; - xmlNodePtr pEncryptedData = nullptr ; - - if( !aTemplate.is() ) - throw RuntimeException() ; - - if( !aSecurityCtx.is() ) - throw RuntimeException() ; - - //Get Keys Manager - Reference< XSecurityEnvironment > xSecEnv - = aSecurityCtx->getSecurityEnvironmentByIndex( - aSecurityCtx->getDefaultSecurityEnvironmentIndex()); - Reference< XUnoTunnel > xSecTunnel( xSecEnv , UNO_QUERY_THROW ) ; - SecurityEnvironment_MSCryptImpl* pSecEnv = reinterpret_cast<SecurityEnvironment_MSCryptImpl*>(xSecTunnel->getSomething( SecurityEnvironment_MSCryptImpl::getUnoTunnelId() )); - if( pSecEnv == nullptr ) - throw RuntimeException() ; - - //Get the encryption template - Reference< XXMLElementWrapper > xTemplate = aTemplate->getTemplate() ; - if( !xTemplate.is() ) { - throw RuntimeException() ; - } - - Reference< XUnoTunnel > xTplTunnel( xTemplate , UNO_QUERY_THROW ) ; - XMLElementWrapper_XmlSecImpl* pTemplate = reinterpret_cast<XMLElementWrapper_XmlSecImpl*>(xTplTunnel->getSomething( XMLElementWrapper_XmlSecImpl::getUnoTunnelImplementationId() )); - if( pTemplate == nullptr ) { - throw RuntimeException() ; - } - - pEncryptedData = pTemplate->getNativeElement() ; - - //remember the position of the element to be signed - bool isParentRef = true; - xmlNodePtr pParent = pEncryptedData->parent; - xmlNodePtr referenceNode; - - if (pEncryptedData == pParent->children) - { - referenceNode = pParent; - } - else - { - referenceNode = pEncryptedData->prev; - isParentRef = false; - } - - setErrorRecorder( ); - - pMngr = pSecEnv->createKeysManager(); - if( !pMngr ) { - throw RuntimeException() ; - } - - //Create Encryption context - pEncCtx = xmlSecEncCtxCreate( pMngr ) ; - if( pEncCtx == nullptr ) - { - SecurityEnvironment_MSCryptImpl::destroyKeysManager( pMngr ); - //throw XMLEncryptionException() ; - clearErrorRecorder(); - return aTemplate; - } - - //Decrypt the template - if( xmlSecEncCtxDecrypt( pEncCtx , pEncryptedData ) < 0 || pEncCtx->result == nullptr ) { - aTemplate->setStatus(css::xml::crypto::SecurityOperationStatus_UNKNOWN); - xmlSecEncCtxDestroy( pEncCtx ) ; - SecurityEnvironment_MSCryptImpl::destroyKeysManager( pMngr ); - - //throw XMLEncryptionException() ; - clearErrorRecorder(); - return aTemplate; - } - aTemplate->setStatus(css::xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED); -#if 0 // This code block has been commented out since 2004, - // but let's keep it here in case it contains some useful hints - // for future work. - if( pEncCtx->resultReplaced != 0 ) { - pContent = pEncryptedData ; - - Reference< XUnoTunnel > xTunnel( ret , UNO_QUERY ) ; - if( !xTunnel.is() ) { - xmlSecEncCtxDestroy( pEncCtx ) ; - throw RuntimeException() ; - } - XMLElementWrapper_XmlSecImpl* pNode = ( XMLElementWrapper_XmlSecImpl* )xTunnel->getSomething( XMLElementWrapper_XmlSecImpl::getUnoTunnelImplementationId() ) ; - if( pNode == NULL ) { - xmlSecEncCtxDestroy( pEncCtx ) ; - throw RuntimeException() ; - } - - pNode->setNativeElement( pContent ) ; - } else { - xmlSecEncCtxDestroy( pEncCtx ) ; - throw RuntimeException() ; - } -#endif // 0 - - //Destroy the encryption context - xmlSecEncCtxDestroy( pEncCtx ) ; - SecurityEnvironment_MSCryptImpl::destroyKeysManager( pMngr ); - - //get the decrypted element - XMLElementWrapper_XmlSecImpl * ret = new XMLElementWrapper_XmlSecImpl(isParentRef? - (referenceNode->children):(referenceNode->next)); - - //return ret; - aTemplate->setTemplate(ret); - - clearErrorRecorder(); - return aTemplate; -} - -/* XServiceInfo */ -OUString SAL_CALL XMLEncryption_MSCryptImpl::getImplementationName() { - return impl_getImplementationName() ; -} - -/* XServiceInfo */ -sal_Bool SAL_CALL XMLEncryption_MSCryptImpl::supportsService( const OUString& serviceName) { - Sequence< OUString > seqServiceNames = getSupportedServiceNames() ; - const OUString* pArray = seqServiceNames.getConstArray() ; - for( sal_Int32 i = 0 ; i < seqServiceNames.getLength() ; i ++ ) { - if( *( pArray + i ) == serviceName ) - return true ; - } - return false ; -} - -/* XServiceInfo */ -Sequence< OUString > SAL_CALL XMLEncryption_MSCryptImpl::getSupportedServiceNames() { - return impl_getSupportedServiceNames() ; -} - -//Helper for XServiceInfo -Sequence< OUString > XMLEncryption_MSCryptImpl::impl_getSupportedServiceNames() { - ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ) ; - Sequence<OUString> seqServiceNames { "com.sun.star.xml.crypto.XMLEncryption" }; - return seqServiceNames ; -} - -OUString XMLEncryption_MSCryptImpl::impl_getImplementationName() { - return OUString("com.sun.star.xml.security.bridge.xmlsec.XMLEncryption_MSCryptImpl") ; -} - -//Helper for registry -Reference< XInterface > SAL_CALL XMLEncryption_MSCryptImpl::impl_createInstance( const Reference< XMultiServiceFactory >& aServiceManager ) { - return Reference< XInterface >( *new XMLEncryption_MSCryptImpl( aServiceManager ) ) ; -} - -Reference< XSingleServiceFactory > XMLEncryption_MSCryptImpl::impl_createFactory( const Reference< XMultiServiceFactory >& aServiceManager ) { - //Reference< XSingleServiceFactory > xFactory ; - //xFactory = ::cppu::createSingleFactory( aServiceManager , impl_getImplementationName , impl_createInstance , impl_getSupportedServiceNames ) ; - //return xFactory ; - return ::cppu::createSingleFactory( aServiceManager , impl_getImplementationName() , impl_createInstance , impl_getSupportedServiceNames() ) ; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.hxx b/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.hxx deleted file mode 100644 index c445cea1bdc8..000000000000 --- a/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.hxx +++ /dev/null @@ -1,84 +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/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_XMLSECURITY_SOURCE_XMLSEC_MSCRYPT_XMLENCRYPTION_MSCRYPTIMPL_HXX -#define INCLUDED_XMLSECURITY_SOURCE_XMLSEC_MSCRYPT_XMLENCRYPTION_MSCRYPTIMPL_HXX - -#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> - -class XMLEncryption_MSCryptImpl : public ::cppu::WeakImplHelper< - css::xml::crypto::XXMLEncryption , - css::lang::XServiceInfo > -{ - private: - css::uno::Reference< css::lang::XMultiServiceFactory > m_xServiceManager ; - - public: - explicit XMLEncryption_MSCryptImpl(const css::uno::Reference<css::lang::XMultiServiceFactory>& rFactory); - virtual ~XMLEncryption_MSCryptImpl() override; - - //Methods from XXMLEncryption - virtual css::uno::Reference< css::xml::crypto::XXMLEncryptionTemplate > SAL_CALL encrypt( - const css::uno::Reference< css::xml::crypto::XXMLEncryptionTemplate >& aTemplate , - const css::uno::Reference< css::xml::crypto::XSecurityEnvironment >& aEnvironment) - // ) throw( css::uno::Exception , css::uno::RuntimeException ) ; - override; - - 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; - - //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() ; - - /// @throws css::uno::RuntimeException - static OUString impl_getImplementationName() ; - - //Helper for registry - /// @throws css::uno::RuntimeException - 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_MSCRYPT_XMLENCRYPTION_MSCRYPTIMPL_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlsecurity/source/xmlsec/mscrypt/xsec_mscrypt.cxx b/xmlsecurity/source/xmlsec/mscrypt/xsec_mscrypt.cxx index 369a73a43ac3..d5545f4f1990 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/xsec_mscrypt.cxx +++ b/xmlsecurity/source/xmlsec/mscrypt/xsec_mscrypt.cxx @@ -26,7 +26,6 @@ #include "seinitializer_mscryptimpl.hxx" #include "xmlsignature_mscryptimpl.hxx" -#include "xmlencryption_mscryptimpl.hxx" #include "xmlsecuritycontext_mscryptimpl.hxx" #include "securityenvironment_mscryptimpl.hxx" @@ -50,8 +49,6 @@ void* SAL_CALL mscrypt_component_getFactory( const sal_Char* pImplName , void* p xFactory = XMLSecurityContext_MSCryptImpl::impl_createFactory( static_cast< XMultiServiceFactory* >( pServiceManager ) ) ; } else if( SecurityEnvironment_MSCryptImpl::impl_getImplementationName().equalsAscii( pImplName ) ) { xFactory = SecurityEnvironment_MSCryptImpl::impl_createFactory( static_cast< XMultiServiceFactory* >( pServiceManager ) ) ; - } else if( XMLEncryption_MSCryptImpl::impl_getImplementationName().equalsAscii( pImplName ) ) { - xFactory = XMLEncryption_MSCryptImpl::impl_createFactory( static_cast< XMultiServiceFactory* >( pServiceManager ) ) ; } else if( SEInitializer_MSCryptImpl_getImplementationName().equalsAscii( pImplName ) ) { xFactory.set( createSingleFactory( static_cast< XMultiServiceFactory * >( pServiceManager ), diff --git a/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.hxx b/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.hxx deleted file mode 100644 index 276a4c5c0350..000000000000 --- a/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.hxx +++ /dev/null @@ -1,81 +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/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_XMLSECURITY_SOURCE_XMLSEC_NSS_XMLENCRYPTION_NSSIMPL_HXX -#define INCLUDED_XMLSECURITY_SOURCE_XMLSEC_NSS_XMLENCRYPTION_NSSIMPL_HXX - -#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> - -class XMLEncryption_NssImpl : public ::cppu::WeakImplHelper< - css::xml::crypto::XXMLEncryption , - css::lang::XServiceInfo > -{ - public: - explicit XMLEncryption_NssImpl(); - virtual ~XMLEncryption_NssImpl() override ; - - //Methods from XXMLEncryption - virtual css::uno::Reference< css::xml::crypto::XXMLEncryptionTemplate > SAL_CALL encrypt( - const css::uno::Reference< css::xml::crypto::XXMLEncryptionTemplate >& aTemplate , - const css::uno::Reference< css::xml::crypto::XSecurityEnvironment >& aEnvironment) - // ) throw( css::uno::Exception , css::uno::RuntimeException ) ; - override; - - 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; - - //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() ; - - /// @throws css::uno::RuntimeException - static OUString impl_getImplementationName() ; - - //Helper for registry - /// @throws css::uno::RuntimeException - 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_NSS_XMLENCRYPTION_NSSIMPL_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlsecurity/source/xmlsec/nss/xsec_nss.cxx b/xmlsecurity/source/xmlsec/nss/xsec_nss.cxx index e901c9fbdd2c..555cd60b4a90 100644 --- a/xmlsecurity/source/xmlsec/nss/xsec_nss.cxx +++ b/xmlsecurity/source/xmlsec/nss/xsec_nss.cxx @@ -26,7 +26,6 @@ #include "seinitializer_nssimpl.hxx" #include "xmlsignature_nssimpl.hxx" -#include "xmlencryption_nssimpl.hxx" #include "xmlsecuritycontext_nssimpl.hxx" #include "xsec_xmlsec.hxx" #include "securityenvironment_nssimpl.hxx" |