summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-02-16 09:11:32 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-02-16 10:49:19 +0000
commit99263598bfb7911a18dae48e1d9fc01e11e0143c (patch)
treeac0392f23e0ebcf9dbc80c00b25ceb8f90c82429
parentc04f7de3d2b9fb490ce6ef425d147037cb1b5d8d (diff)
xmlsecurity: remove unused DecryptorImpl
No longer necessary since commit 50669de68785d61534c4c3fe101fd8e1d12fae65 (xmlsecurity: remove unused xsec_fw_component_getFactory(), 2017-02-02). Change-Id: I24ee6fcd01a238151058559a7bf994e27b7b64cf Reviewed-on: https://gerrit.libreoffice.org/34332 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
-rw-r--r--xmlsecurity/Library_xsec_fw.mk1
-rw-r--r--xmlsecurity/source/framework/decryptorimpl.cxx175
-rw-r--r--xmlsecurity/source/framework/decryptorimpl.hxx92
3 files changed, 0 insertions, 268 deletions
diff --git a/xmlsecurity/Library_xsec_fw.mk b/xmlsecurity/Library_xsec_fw.mk
index dfe832a47252..201fc71b9a85 100644
--- a/xmlsecurity/Library_xsec_fw.mk
+++ b/xmlsecurity/Library_xsec_fw.mk
@@ -32,7 +32,6 @@ $(eval $(call gb_Library_use_libraries,xsec_fw,\
$(eval $(call gb_Library_add_exception_objects,xsec_fw,\
xmlsecurity/source/framework/buffernode \
- xmlsecurity/source/framework/decryptorimpl \
xmlsecurity/source/framework/elementcollector \
xmlsecurity/source/framework/elementmark \
xmlsecurity/source/framework/encryptionengine \
diff --git a/xmlsecurity/source/framework/decryptorimpl.cxx b/xmlsecurity/source/framework/decryptorimpl.cxx
deleted file mode 100644
index 757b5d9507d6..000000000000
--- a/xmlsecurity/source/framework/decryptorimpl.cxx
+++ /dev/null
@@ -1,175 +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 "decryptorimpl.hxx"
-#include <com/sun/star/xml/crypto/XXMLEncryptionTemplate.hpp>
-#include <com/sun/star/xml/wrapper/XXMLElementWrapper.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <comphelper/processfactory.hxx>
-#include <cppuhelper/supportsservice.hxx>
-#include <osl/diagnose.h>
-
-using namespace com::sun::star::uno;
-namespace cssu = com::sun::star::uno;
-namespace cssl = com::sun::star::lang;
-namespace cssxc = com::sun::star::xml::crypto;
-namespace cssxw = com::sun::star::xml::wrapper;
-
-#define IMPLEMENTATION_NAME "com.sun.star.xml.security.framework.DecryptorImpl"
-
-DecryptorImpl::DecryptorImpl(const Reference< XComponentContext > & xContext) : DecryptorImpl_Base(xContext)
-{
-}
-
-DecryptorImpl::~DecryptorImpl()
-{
-}
-
-bool DecryptorImpl::checkReady() const
-/****** DecryptorImpl/checkReady *********************************************
- *
- * NAME
- * checkReady -- checks the conditions for the decryption.
- *
- * SYNOPSIS
- * bReady = checkReady( );
- *
- * FUNCTION
- * checks whether all following conditions are satisfied:
- * 1. the result listener is ready;
- * 2. the EncryptionEngine is ready.
- *
- * RESULT
- * bReady - true if all conditions are satisfied, false otherwise
- ******************************************************************************/
-{
- return (m_xResultListener.is() && EncryptionEngine::checkReady());
-}
-
-void DecryptorImpl::notifyResultListener() const
-/****** DecryptorImpl/notifyResultListener ***********************************
- *
- * NAME
- * notifyResultListener -- notifies the listener about the decryption
- * result.
- ******************************************************************************/
-{
- cssu::Reference< cssxc::sax::XDecryptionResultListener >
- xDecryptionResultListener ( m_xResultListener , cssu::UNO_QUERY ) ;
-
- xDecryptionResultListener->decrypted(m_nSecurityId,m_nStatus);
-}
-
-void DecryptorImpl::startEngine( const cssu::Reference<
- cssxc::XXMLEncryptionTemplate >&
- xEncryptionTemplate)
-/****** DecryptorImpl/startEngine ********************************************
- *
- * NAME
- * startEngine -- decrypts the encryption.
- *
- * FUNCTION
- * decrypts the encryption element, then if succeeds, updates the link
- * of old template element to the new encryption element in
- * SAXEventKeeper.
- *
- * INPUTS
- * xEncryptionTemplate - the encryption template to be decrypted.
- ******************************************************************************/
-{
- cssu::Reference< cssxc::XXMLEncryptionTemplate > xResultTemplate;
- try
- {
- xResultTemplate = m_xXMLEncryption->decrypt(xEncryptionTemplate, m_xXMLSecurityContext);
- m_nStatus = xResultTemplate->getStatus();
- }
- catch( cssu::Exception& )
- {
- m_nStatus = cssxc::SecurityOperationStatus_RUNTIMEERROR_FAILED;
- }
-
- if (m_nStatus == cssxc::SecurityOperationStatus_OPERATION_SUCCEEDED)
- {
- cssu::Reference< cssxw::XXMLElementWrapper > xDecryptedElement
- = xResultTemplate->getTemplate();
- m_xSAXEventKeeper->setElement(m_nIdOfTemplateEC, xDecryptedElement);
- }
-}
-
-/* XDecryptionResultBroadcaster */
-void SAL_CALL DecryptorImpl::addDecryptionResultListener( const cssu::Reference< cssxc::sax::XDecryptionResultListener >& listener )
-{
- m_xResultListener = listener;
- tryToPerform();
-}
-
-void SAL_CALL DecryptorImpl::removeDecryptionResultListener( const cssu::Reference< cssxc::sax::XDecryptionResultListener >&)
-{
-}
-
-/* XInitialization */
-void SAL_CALL DecryptorImpl::initialize( const cssu::Sequence< cssu::Any >& aArguments )
-{
- OSL_ASSERT(aArguments.getLength() == 5);
-
- OUString ouTempString;
-
- aArguments[0] >>= ouTempString;
- m_nSecurityId = ouTempString.toInt32();
- aArguments[1] >>= m_xSAXEventKeeper;
- aArguments[2] >>= ouTempString;
- m_nIdOfTemplateEC = ouTempString.toInt32();
- aArguments[3] >>= m_xXMLSecurityContext;
- aArguments[4] >>= m_xXMLEncryption;
-}
-
-OUString DecryptorImpl_getImplementationName ()
-{
- return OUString ( IMPLEMENTATION_NAME );
-}
-
-cssu::Sequence< OUString > SAL_CALL DecryptorImpl_getSupportedServiceNames( )
-{
- cssu::Sequence<OUString> aRet { "com.sun.star.xml.crypto.sax.Decryptor" };
- return aRet;
-}
-
-cssu::Reference< cssu::XInterface > SAL_CALL DecryptorImpl_createInstance( const cssu::Reference< cssl::XMultiServiceFactory >& xMSF)
-{
- return static_cast<cppu::OWeakObject*>(new DecryptorImpl( comphelper::getComponentContext( xMSF ) ));
-}
-
-/* XServiceInfo */
-OUString SAL_CALL DecryptorImpl::getImplementationName( )
-{
- return DecryptorImpl_getImplementationName();
-}
-
-sal_Bool SAL_CALL DecryptorImpl::supportsService( const OUString& rServiceName )
-{
- return cppu::supportsService(this, rServiceName);
-}
-
-cssu::Sequence< OUString > SAL_CALL DecryptorImpl::getSupportedServiceNames( )
-{
- return DecryptorImpl_getSupportedServiceNames();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/framework/decryptorimpl.hxx b/xmlsecurity/source/framework/decryptorimpl.hxx
deleted file mode 100644
index b1b72c1ef0e9..000000000000
--- a/xmlsecurity/source/framework/decryptorimpl.hxx
+++ /dev/null
@@ -1,92 +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_FRAMEWORK_DECRYPTORIMPL_HXX
-#define INCLUDED_XMLSECURITY_SOURCE_FRAMEWORK_DECRYPTORIMPL_HXX
-
-#include <com/sun/star/xml/crypto/sax/XDecryptionResultBroadcaster.hpp>
-#include <com/sun/star/xml/crypto/sax/XDecryptionResultListener.hpp>
-#include <com/sun/star/xml/crypto/XXMLSecurityContext.hpp>
-#include <com/sun/star/lang/XInitialization.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <cppuhelper/implbase.hxx>
-
-#include "encryptionengine.hxx"
-
-typedef cppu::ImplInheritanceHelper
-<
- EncryptionEngine,
- css::xml::crypto::sax::XDecryptionResultBroadcaster,
- css::lang::XInitialization,
- css::lang::XServiceInfo
-> DecryptorImpl_Base;
-class DecryptorImpl : public DecryptorImpl_Base
-/****** DecryptorImpl.hxx/CLASS DecryptorImpl *********************************
- *
- * NAME
- * DecryptorImpl -- decrypts an encryption
- *
- * FUNCTION
- * Collects all resources for decrypting an encryption, then decrypts the
- * encryption by invoking a xmlsec-based encryption bridge component.
- ******************************************************************************/
-{
-private:
- css::uno::Reference< css::xml::crypto::XXMLSecurityContext > m_xXMLSecurityContext;
-
- virtual void notifyResultListener() const override;
- virtual bool checkReady() const override;
- virtual void startEngine( const css::uno::Reference<
- css::xml::crypto::XXMLEncryptionTemplate >&
- xEncryptionTemplate) override;
-
-public:
- explicit DecryptorImpl(const css::uno::Reference< css::uno::XComponentContext > & xContext);
- virtual ~DecryptorImpl() override;
-
- /* XDecryptionResultBroadcaster */
- virtual void SAL_CALL addDecryptionResultListener(
- const css::uno::Reference< css::xml::crypto::sax::XDecryptionResultListener >& listener ) override;
- virtual void SAL_CALL removeDecryptionResultListener(
- const css::uno::Reference< css::xml::crypto::sax::XDecryptionResultListener >& listener ) override;
-
- /* XInitialization */
- virtual void SAL_CALL initialize(
- const css::uno::Sequence< css::uno::Any >& aArguments ) 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;
-};
-
-/// @throws css::uno::RuntimeException
-OUString DecryptorImpl_getImplementationName();
-
-/// @throws css::uno::RuntimeException
-css::uno::Sequence< OUString > SAL_CALL DecryptorImpl_getSupportedServiceNames( );
-
-/// @throws css::uno::Exception
-css::uno::Reference< css::uno::XInterface >
-SAL_CALL DecryptorImpl_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr);
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */