diff options
Diffstat (limited to 'xmlsecurity/source/xmlsec')
41 files changed, 317 insertions, 516 deletions
diff --git a/xmlsecurity/source/xmlsec/certificateextension_xmlsecimpl.hxx b/xmlsecurity/source/xmlsec/certificateextension_xmlsecimpl.hxx index 6c6723f08aad..112aebc7f7d8 100644 --- a/xmlsecurity/source/xmlsec/certificateextension_xmlsecimpl.hxx +++ b/xmlsecurity/source/xmlsec/certificateextension_xmlsecimpl.hxx @@ -37,17 +37,17 @@ class CertificateExtension_XmlSecImpl : public ::cppu::WeakImplHelper< public: //Methods from XCertificateExtension - virtual sal_Bool SAL_CALL isCritical() throw( css::uno::RuntimeException, std::exception ) override + virtual sal_Bool SAL_CALL isCritical() override { return m_Extn.m_critical; } - virtual css::uno::Sequence< sal_Int8 > SAL_CALL getExtensionId() throw( css::uno::RuntimeException, std::exception ) override + virtual css::uno::Sequence< sal_Int8 > SAL_CALL getExtensionId() override { return m_Extn.m_xExtnId; } - virtual css::uno::Sequence< sal_Int8 > SAL_CALL getExtensionValue() throw( css::uno::RuntimeException, std::exception ) override + virtual css::uno::Sequence< sal_Int8 > SAL_CALL getExtensionValue() override { return m_Extn.m_xExtnValue; } diff --git a/xmlsecurity/source/xmlsec/mscrypt/sanextension_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/sanextension_mscryptimpl.cxx index c5ce74dbf400..5fba1ff146d3 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/sanextension_mscryptimpl.cxx +++ b/xmlsecurity/source/xmlsec/mscrypt/sanextension_mscryptimpl.cxx @@ -44,20 +44,20 @@ SanExtensionImpl::~SanExtensionImpl() { //Methods from XCertificateExtension -sal_Bool SAL_CALL SanExtensionImpl::isCritical() throw( css::uno::RuntimeException ) { +sal_Bool SAL_CALL SanExtensionImpl::isCritical() { return m_critical ; } -css::uno::Sequence< sal_Int8 > SAL_CALL SanExtensionImpl::getExtensionId() throw( css::uno::RuntimeException ) { +css::uno::Sequence< sal_Int8 > SAL_CALL SanExtensionImpl::getExtensionId() { return m_xExtnId ; } -css::uno::Sequence< sal_Int8 > SAL_CALL SanExtensionImpl::getExtensionValue() throw( css::uno::RuntimeException ) { +css::uno::Sequence< sal_Int8 > SAL_CALL SanExtensionImpl::getExtensionValue() { return m_xExtnValue ; } //Methods from XSanExtension -css::uno::Sequence< css::security::CertAltNameEntry > SAL_CALL SanExtensionImpl::getAlternativeNames() throw( css::uno::RuntimeException ){ +css::uno::Sequence< css::security::CertAltNameEntry > SAL_CALL SanExtensionImpl::getAlternativeNames(){ if (!m_Entries.hasElements()) { diff --git a/xmlsecurity/source/xmlsec/mscrypt/sanextension_mscryptimpl.hxx b/xmlsecurity/source/xmlsec/mscrypt/sanextension_mscryptimpl.hxx index c4e391a65fa9..795e08d1a7cf 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/sanextension_mscryptimpl.hxx +++ b/xmlsecurity/source/xmlsec/mscrypt/sanextension_mscryptimpl.hxx @@ -53,15 +53,15 @@ class SanExtensionImpl : public ::cppu::WeakImplHelper< virtual ~SanExtensionImpl() override; //Methods from XCertificateExtension - virtual sal_Bool SAL_CALL isCritical() throw( css::uno::RuntimeException ) override; + virtual sal_Bool SAL_CALL isCritical() override; - virtual css::uno::Sequence< sal_Int8 > SAL_CALL getExtensionId() throw( css::uno::RuntimeException ) override; + virtual css::uno::Sequence< sal_Int8 > SAL_CALL getExtensionId() override; - virtual css::uno::Sequence< sal_Int8 > SAL_CALL getExtensionValue() throw( css::uno::RuntimeException ) override; + virtual css::uno::Sequence< sal_Int8 > SAL_CALL getExtensionValue() override; //Methods from XSanExtension - virtual css::uno::Sequence< css::security::CertAltNameEntry > SAL_CALL getAlternativeNames() throw( css::uno::RuntimeException ) override; + virtual css::uno::Sequence< css::security::CertAltNameEntry > SAL_CALL getAlternativeNames() override; //Helper method void setCertExtn( unsigned char* value, unsigned int vlen, unsigned char* id, unsigned int idlen, bool critical ) ; diff --git a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx index 39f52f76d753..f383046aa5d3 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx +++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx @@ -154,12 +154,12 @@ SecurityEnvironment_MSCryptImpl::~SecurityEnvironment_MSCryptImpl() { } /* XServiceInfo */ -OUString SAL_CALL SecurityEnvironment_MSCryptImpl::getImplementationName() throw( RuntimeException ) { +OUString SAL_CALL SecurityEnvironment_MSCryptImpl::getImplementationName() { return impl_getImplementationName() ; } /* XServiceInfo */ -sal_Bool SAL_CALL SecurityEnvironment_MSCryptImpl::supportsService( const OUString& serviceName) throw( RuntimeException ) { +sal_Bool SAL_CALL SecurityEnvironment_MSCryptImpl::supportsService( const OUString& serviceName) { Sequence< OUString > seqServiceNames = getSupportedServiceNames() ; const OUString* pArray = seqServiceNames.getConstArray() ; for( sal_Int32 i = 0 ; i < seqServiceNames.getLength() ; i ++ ) { @@ -170,7 +170,7 @@ sal_Bool SAL_CALL SecurityEnvironment_MSCryptImpl::supportsService( const OUStri } /* XServiceInfo */ -Sequence< OUString > SAL_CALL SecurityEnvironment_MSCryptImpl::getSupportedServiceNames() throw( RuntimeException ) { +Sequence< OUString > SAL_CALL SecurityEnvironment_MSCryptImpl::getSupportedServiceNames() { return impl_getSupportedServiceNames() ; } @@ -181,12 +181,12 @@ Sequence< OUString > SecurityEnvironment_MSCryptImpl::impl_getSupportedServiceNa return seqServiceNames ; } -OUString SecurityEnvironment_MSCryptImpl::impl_getImplementationName() throw( RuntimeException ) { +OUString SecurityEnvironment_MSCryptImpl::impl_getImplementationName() { return OUString("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_MSCryptImpl") ; } //Helper for registry -Reference< XInterface > SAL_CALL SecurityEnvironment_MSCryptImpl::impl_createInstance( const Reference< XMultiServiceFactory >& aServiceManager ) throw( RuntimeException ) { +Reference< XInterface > SAL_CALL SecurityEnvironment_MSCryptImpl::impl_createInstance( const Reference< XMultiServiceFactory >& aServiceManager ) { return Reference< XInterface >( *new SecurityEnvironment_MSCryptImpl( aServiceManager ) ) ; } @@ -196,7 +196,6 @@ Reference< XSingleServiceFactory > SecurityEnvironment_MSCryptImpl::impl_createF /* XUnoTunnel */ sal_Int64 SAL_CALL SecurityEnvironment_MSCryptImpl::getSomething( const Sequence< sal_Int8 >& aIdentifier ) - throw( RuntimeException ) { if( aIdentifier.getLength() == 16 && 0 == memcmp( getUnoTunnelId().getConstArray(), aIdentifier.getConstArray(), 16 ) ) { return reinterpret_cast<sal_Int64>(this); @@ -225,11 +224,11 @@ SecurityEnvironment_MSCryptImpl* SecurityEnvironment_MSCryptImpl::getImplementat return nullptr ; } -HCRYPTPROV SecurityEnvironment_MSCryptImpl::getCryptoProvider() throw( css::uno::Exception , css::uno::RuntimeException ) { +HCRYPTPROV SecurityEnvironment_MSCryptImpl::getCryptoProvider() { return m_hProv ; } -void SecurityEnvironment_MSCryptImpl::setCryptoProvider( HCRYPTPROV aProv ) throw( css::uno::Exception , css::uno::RuntimeException ) { +void SecurityEnvironment_MSCryptImpl::setCryptoProvider( HCRYPTPROV aProv ) { if( m_hProv != NULL ) { CryptReleaseContext( m_hProv, 0 ) ; m_hProv = NULL ; @@ -240,21 +239,21 @@ void SecurityEnvironment_MSCryptImpl::setCryptoProvider( HCRYPTPROV aProv ) thro } } -LPCTSTR SecurityEnvironment_MSCryptImpl::getKeyContainer() throw( css::uno::Exception , css::uno::RuntimeException ) { +LPCTSTR SecurityEnvironment_MSCryptImpl::getKeyContainer() { return m_pszContainer ; } -void SecurityEnvironment_MSCryptImpl::setKeyContainer( LPCTSTR aKeyContainer ) throw( css::uno::Exception , css::uno::RuntimeException ) { +void SecurityEnvironment_MSCryptImpl::setKeyContainer( LPCTSTR aKeyContainer ) { //TODO: Don't know whether or not it should be copied. m_pszContainer = aKeyContainer ; } -HCERTSTORE SecurityEnvironment_MSCryptImpl::getCryptoSlot() throw( Exception , RuntimeException ) { +HCERTSTORE SecurityEnvironment_MSCryptImpl::getCryptoSlot() { return m_hKeyStore ; } -void SecurityEnvironment_MSCryptImpl::setCryptoSlot( HCERTSTORE aSlot) throw( Exception , RuntimeException ) { +void SecurityEnvironment_MSCryptImpl::setCryptoSlot( HCERTSTORE aSlot) { if( m_hKeyStore != nullptr ) { CertCloseStore( m_hKeyStore, CERT_CLOSE_STORE_FORCE_FLAG ) ; m_hKeyStore = nullptr ; @@ -265,11 +264,11 @@ void SecurityEnvironment_MSCryptImpl::setCryptoSlot( HCERTSTORE aSlot) throw( Ex } } -HCERTSTORE SecurityEnvironment_MSCryptImpl::getCertDb() throw( Exception , RuntimeException ) { +HCERTSTORE SecurityEnvironment_MSCryptImpl::getCertDb() { return m_hCertStore ; } -void SecurityEnvironment_MSCryptImpl::setCertDb( HCERTSTORE aCertDb ) throw( Exception , RuntimeException ) { +void SecurityEnvironment_MSCryptImpl::setCertDb( HCERTSTORE aCertDb ) { if( m_hCertStore != nullptr ) { CertCloseStore( m_hCertStore, CERT_CLOSE_STORE_FORCE_FLAG ) ; m_hCertStore = nullptr ; @@ -346,7 +345,7 @@ extern "C" BOOL WINAPI cert_enum_system_store_callback(const void *pvSystemStore #endif //Methods from XSecurityEnvironment -Sequence< Reference < XCertificate > > SecurityEnvironment_MSCryptImpl::getPersonalCertificates() throw( SecurityException , RuntimeException ) +Sequence< Reference < XCertificate > > SecurityEnvironment_MSCryptImpl::getPersonalCertificates() { sal_Int32 length ; X509Certificate_MSCryptImpl* xcert ; @@ -421,7 +420,7 @@ Sequence< Reference < XCertificate > > SecurityEnvironment_MSCryptImpl::getPerso } -Reference< XCertificate > SecurityEnvironment_MSCryptImpl::getCertificate( const OUString& issuerName, const Sequence< sal_Int8 >& serialNumber ) throw( SecurityException , RuntimeException ) { +Reference< XCertificate > SecurityEnvironment_MSCryptImpl::getCertificate( const OUString& issuerName, const Sequence< sal_Int8 >& serialNumber ) { unsigned int i ; LPCSTR pszName ; X509Certificate_MSCryptImpl *xcert = nullptr ; @@ -618,12 +617,12 @@ Reference< XCertificate > SecurityEnvironment_MSCryptImpl::getCertificate( const return xcert ; } -Reference< XCertificate > SecurityEnvironment_MSCryptImpl::getCertificate( const OUString& issuerName, const OUString& serialNumber ) throw( SecurityException , RuntimeException ) { +Reference< XCertificate > SecurityEnvironment_MSCryptImpl::getCertificate( const OUString& issuerName, const OUString& serialNumber ) { Sequence< sal_Int8 > serial = numericStringToBigInteger( serialNumber ) ; return getCertificate( issuerName, serial ) ; } -Sequence< Reference < XCertificate > > SecurityEnvironment_MSCryptImpl::buildCertificatePath( const Reference< XCertificate >& begin ) throw( SecurityException , RuntimeException ) { +Sequence< Reference < XCertificate > > SecurityEnvironment_MSCryptImpl::buildCertificatePath( const Reference< XCertificate >& begin ) { PCCERT_CHAIN_CONTEXT pChainContext ; PCCERT_CONTEXT pCertContext ; const X509Certificate_MSCryptImpl* xcert ; @@ -745,7 +744,7 @@ Sequence< Reference < XCertificate > > SecurityEnvironment_MSCryptImpl::buildCer return Sequence< Reference < XCertificate > >(); } -Reference< XCertificate > SecurityEnvironment_MSCryptImpl::createCertificateFromRaw( const Sequence< sal_Int8 >& rawCertificate ) throw( SecurityException , RuntimeException ) { +Reference< XCertificate > SecurityEnvironment_MSCryptImpl::createCertificateFromRaw( const Sequence< sal_Int8 >& rawCertificate ) { X509Certificate_MSCryptImpl* xcert ; if( rawCertificate.getLength() > 0 ) { @@ -758,7 +757,7 @@ Reference< XCertificate > SecurityEnvironment_MSCryptImpl::createCertificateFrom return xcert ; } -Reference< XCertificate > SecurityEnvironment_MSCryptImpl::createCertificateFromAscii( const OUString& asciiCertificate ) throw( SecurityException , RuntimeException ) { +Reference< XCertificate > SecurityEnvironment_MSCryptImpl::createCertificateFromAscii( const OUString& asciiCertificate ) { xmlChar* chCert ; xmlSecSize certSize ; @@ -809,7 +808,6 @@ HCERTSTORE getCertStoreForIntermediatCerts( sal_Int32 SecurityEnvironment_MSCryptImpl::verifyCertificate( const Reference< css::security::XCertificate >& aCert, const Sequence< Reference< css::security::XCertificate > >& seqCerts) - throw( css::uno::SecurityException, css::uno::RuntimeException ) { sal_Int32 validity = 0; PCCERT_CHAIN_CONTEXT pChainContext = nullptr; @@ -978,7 +976,7 @@ sal_Int32 SecurityEnvironment_MSCryptImpl::verifyCertificate( return validity ; } -sal_Int32 SecurityEnvironment_MSCryptImpl::getCertificateCharacters( const css::uno::Reference< css::security::XCertificate >& aCert ) throw( css::uno::SecurityException, css::uno::RuntimeException ) { +sal_Int32 SecurityEnvironment_MSCryptImpl::getCertificateCharacters( const css::uno::Reference< css::security::XCertificate >& aCert ) { sal_Int32 characters ; PCCERT_CONTEXT pCertContext ; const X509Certificate_MSCryptImpl* xcert ; @@ -1027,11 +1025,11 @@ sal_Int32 SecurityEnvironment_MSCryptImpl::getCertificateCharacters( const css:: return characters ; } -void SecurityEnvironment_MSCryptImpl::enableDefaultCrypt( bool enable ) throw( Exception, RuntimeException ) { +void SecurityEnvironment_MSCryptImpl::enableDefaultCrypt( bool enable ) { m_bEnableDefault = enable ; } -bool SecurityEnvironment_MSCryptImpl::defaultEnabled() throw( Exception, RuntimeException ) { +bool SecurityEnvironment_MSCryptImpl::defaultEnabled() { return m_bEnableDefault ; } @@ -1049,12 +1047,12 @@ static X509Certificate_MSCryptImpl* MswcryCertContextToXCert( PCCERT_CONTEXT cer return xcert ; } -OUString SecurityEnvironment_MSCryptImpl::getSecurityEnvironmentInformation() throw( css::uno::RuntimeException ) +OUString SecurityEnvironment_MSCryptImpl::getSecurityEnvironmentInformation() { return OUString("Microsoft Crypto API"); } -xmlSecKeysMngrPtr SecurityEnvironment_MSCryptImpl::createKeysManager() throw( Exception, RuntimeException ) { +xmlSecKeysMngrPtr SecurityEnvironment_MSCryptImpl::createKeysManager() { xmlSecKeysMngrPtr pKeysMngr = nullptr ; @@ -1112,7 +1110,7 @@ xmlSecKeysMngrPtr SecurityEnvironment_MSCryptImpl::createKeysManager() throw( Ex return pKeysMngr ; } -void SecurityEnvironment_MSCryptImpl::destroyKeysManager(xmlSecKeysMngrPtr pKeysMngr) throw( Exception, RuntimeException ) { +void SecurityEnvironment_MSCryptImpl::destroyKeysManager(xmlSecKeysMngrPtr pKeysMngr) { if( pKeysMngr != nullptr ) { xmlSecKeysMngrDestroy( pKeysMngr ) ; } diff --git a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx index 3a4280bfb10a..932f69cd89c7 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx +++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx @@ -83,117 +83,109 @@ class SecurityEnvironment_MSCryptImpl : public ::cppu::WeakImplHelper< virtual ~SecurityEnvironment_MSCryptImpl() override; //Methods from XSecurityEnvironment - virtual css::uno::Sequence< css::uno::Reference< css::security::XCertificate > > SAL_CALL getPersonalCertificates() - throw( css::uno::SecurityException , css::uno::RuntimeException ) override; + virtual css::uno::Sequence< css::uno::Reference< css::security::XCertificate > > SAL_CALL getPersonalCertificates() override; virtual css::uno::Reference< css::security::XCertificate > SAL_CALL getCertificate( const OUString& issuerName, - const css::uno::Sequence< sal_Int8 >& serialNumber ) - throw( css::uno::SecurityException , css::uno::RuntimeException ) override; + const css::uno::Sequence< sal_Int8 >& serialNumber ) override; + /// @throws css::uno::SecurityException + /// @throws css::uno::RuntimeException virtual css::uno::Reference< css::security::XCertificate > SAL_CALL getCertificate( const OUString& issuerName, - const OUString& serialNumber ) - throw( css::uno::SecurityException , css::uno::RuntimeException ) ; + const OUString& serialNumber ) ; virtual css::uno::Sequence< css::uno::Reference< css::security::XCertificate > > SAL_CALL buildCertificatePath( - const css::uno::Reference< css::security::XCertificate >& beginCert ) - throw( css::uno::SecurityException , css::uno::RuntimeException ) override; + const css::uno::Reference< css::security::XCertificate >& beginCert ) override; virtual css::uno::Reference< css::security::XCertificate > SAL_CALL createCertificateFromRaw( - const css::uno::Sequence< sal_Int8 >& rawCertificate ) - throw( css::uno::SecurityException , css::uno::RuntimeException ) override; + const css::uno::Sequence< sal_Int8 >& rawCertificate ) override; virtual css::uno::Reference< css::security::XCertificate > SAL_CALL createCertificateFromAscii( - const OUString& asciiCertificate ) - throw( css::uno::SecurityException , css::uno::RuntimeException ) override; + const OUString& asciiCertificate ) override; virtual ::sal_Int32 SAL_CALL verifyCertificate( const css::uno::Reference< css::security::XCertificate >& xCert, const css::uno::Sequence< css::uno::Reference< - css::security::XCertificate > >& intermediateCertificates) - throw (css::uno::SecurityException, css::uno::RuntimeException) override; + css::security::XCertificate > >& intermediateCertificates) override; virtual ::sal_Int32 SAL_CALL getCertificateCharacters( - const css::uno::Reference< css::security::XCertificate >& xCert ) - throw (css::uno::SecurityException, css::uno::RuntimeException) override; + const css::uno::Reference< css::security::XCertificate >& xCert ) override; - virtual OUString SAL_CALL getSecurityEnvironmentInformation( ) - throw (css::uno::RuntimeException) override; + virtual OUString SAL_CALL getSecurityEnvironmentInformation( ) override; //Methods from XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException ) override; + virtual OUString SAL_CALL getImplementationName() override; virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName - ) throw( css::uno::RuntimeException ) override; + ) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException ) 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() throw( 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 ) - throw( css::uno::RuntimeException ) ; + 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 ) ; //Methods from XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) - throw (css::uno::RuntimeException) override; + virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override; static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId() ; static SecurityEnvironment_MSCryptImpl* getImplementation( const css::uno::Reference< css::uno::XInterface >& rObj ) ; /// @throws css::uno::Exception /// @throws css::uno::RuntimeException - HCRYPTPROV getCryptoProvider() throw( css::uno::Exception , css::uno::RuntimeException ) ; + HCRYPTPROV getCryptoProvider() ; /// @throws css::uno::Exception /// @throws css::uno::RuntimeException - void setCryptoProvider( HCRYPTPROV aProv ) throw( css::uno::Exception , css::uno::RuntimeException ) ; + void setCryptoProvider( HCRYPTPROV aProv ) ; /// @throws css::uno::Exception /// @throws css::uno::RuntimeException - LPCTSTR getKeyContainer() throw( css::uno::Exception , css::uno::RuntimeException ) ; + LPCTSTR getKeyContainer() ; /// @throws css::uno::Exception /// @throws css::uno::RuntimeException - void setKeyContainer( LPCTSTR aKeyContainer ) throw( css::uno::Exception , css::uno::RuntimeException ) ; + void setKeyContainer( LPCTSTR aKeyContainer ) ; /// @throws css::uno::Exception /// @throws css::uno::RuntimeException - HCERTSTORE getCryptoSlot() throw( css::uno::Exception , css::uno::RuntimeException ) ; + HCERTSTORE getCryptoSlot() ; /// @throws css::uno::Exception /// @throws css::uno::RuntimeException - void setCryptoSlot( HCERTSTORE aKeyStore ) throw( css::uno::Exception , css::uno::RuntimeException ) ; + void setCryptoSlot( HCERTSTORE aKeyStore ) ; /// @throws css::uno::Exception /// @throws css::uno::RuntimeException - HCERTSTORE getCertDb() throw( css::uno::Exception , css::uno::RuntimeException ) ; + HCERTSTORE getCertDb() ; /// @throws css::uno::Exception /// @throws css::uno::RuntimeException - void setCertDb( HCERTSTORE aCertDb ) throw( css::uno::Exception , css::uno::RuntimeException ) ; + void setCertDb( HCERTSTORE aCertDb ) ; /// @throws css::uno::Exception /// @throws css::uno::RuntimeException - void enableDefaultCrypt( bool enable ) throw( css::uno::Exception , css::uno::RuntimeException ) ; + void enableDefaultCrypt( bool enable ) ; /// @throws css::uno::Exception /// @throws css::uno::RuntimeException - bool defaultEnabled() throw( css::uno::Exception , css::uno::RuntimeException ) ; + bool defaultEnabled() ; /// @throws css::uno::Exception /// @throws css::uno::RuntimeException - xmlSecKeysMngrPtr createKeysManager() throw( css::uno::Exception , css::uno::RuntimeException ) ; + xmlSecKeysMngrPtr createKeysManager() ; /// @throws css::uno::Exception /// @throws css::uno::RuntimeException - static void destroyKeysManager(xmlSecKeysMngrPtr pKeysMngr) throw( css::uno::Exception , css::uno::RuntimeException ) ; + static void destroyKeysManager(xmlSecKeysMngrPtr pKeysMngr) ; } ; #endif // INCLUDED_XMLSECURITY_SOURCE_XMLSEC_MSCRYPT_SECURITYENVIRONMENT_MSCRYPTIMPL_HXX diff --git a/xmlsecurity/source/xmlsec/mscrypt/seinitializer_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/seinitializer_mscryptimpl.cxx index 91158dd14d6b..72b50e292079 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/seinitializer_mscryptimpl.cxx +++ b/xmlsecurity/source/xmlsec/mscrypt/seinitializer_mscryptimpl.cxx @@ -47,7 +47,6 @@ SEInitializer_MSCryptImpl::~SEInitializer_MSCryptImpl() cssu::Reference< cssxc::XXMLSecurityContext > SAL_CALL SEInitializer_MSCryptImpl::createSecurityContext( const OUString& sCertDB ) - throw (cssu::RuntimeException) { const char* n_pCertStore ; HCERTSTORE n_hStoreHandle ; @@ -118,7 +117,6 @@ cssu::Reference< cssxc::XXMLSecurityContext > SAL_CALL } void SAL_CALL SEInitializer_MSCryptImpl::freeSecurityContext( const cssu::Reference< cssxc::XXMLSecurityContext >&) - throw (cssu::RuntimeException) { /* cssu::Reference< cssxc::XSecurityEnvironment > xSecEnv @@ -148,39 +146,33 @@ void SAL_CALL SEInitializer_MSCryptImpl::freeSecurityContext( const cssu::Refere } OUString SEInitializer_MSCryptImpl_getImplementationName() - throw (cssu::RuntimeException) { return OUString( "com.sun.star.xml.security.bridge.xmlsec.SEInitializer_MSCryptImpl" ); } cssu::Sequence< OUString > SAL_CALL SEInitializer_MSCryptImpl_getSupportedServiceNames() - throw (cssu::RuntimeException) { cssu::Sequence<OUString> aRet { "com.sun.star.xml.crypto.SEInitializer" }; return aRet; } cssu::Reference< cssu::XInterface > SAL_CALL SEInitializer_MSCryptImpl_createInstance( const cssu::Reference< cssl::XMultiServiceFactory > & rSMgr) - throw( cssu::Exception ) { return static_cast<cppu::OWeakObject*>(new SEInitializer_MSCryptImpl( comphelper::getComponentContext(rSMgr) )); } /* XServiceInfo */ OUString SAL_CALL SEInitializer_MSCryptImpl::getImplementationName() - throw (cssu::RuntimeException) { return SEInitializer_MSCryptImpl_getImplementationName(); } sal_Bool SAL_CALL SEInitializer_MSCryptImpl::supportsService( const OUString& rServiceName ) - throw (cssu::RuntimeException) { return cppu::supportsService( this, rServiceName ); } cssu::Sequence< OUString > SAL_CALL SEInitializer_MSCryptImpl::getSupportedServiceNames() - throw (cssu::RuntimeException) { return SEInitializer_MSCryptImpl_getSupportedServiceNames(); } diff --git a/xmlsecurity/source/xmlsec/mscrypt/seinitializer_mscryptimpl.hxx b/xmlsecurity/source/xmlsec/mscrypt/seinitializer_mscryptimpl.hxx index b36da2d65986..05afb7bd0db8 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/seinitializer_mscryptimpl.hxx +++ b/xmlsecurity/source/xmlsec/mscrypt/seinitializer_mscryptimpl.hxx @@ -56,37 +56,28 @@ public: /* XSEInitializer */ virtual css::uno::Reference< css::xml::crypto::XXMLSecurityContext > - SAL_CALL createSecurityContext( const OUString& certDB ) - throw (css::uno::RuntimeException) override; + SAL_CALL createSecurityContext( const OUString& certDB ) override; virtual void SAL_CALL freeSecurityContext( const css::uno::Reference< - css::xml::crypto::XXMLSecurityContext >& securityContext ) - throw (css::uno::RuntimeException) override; + css::xml::crypto::XXMLSecurityContext >& securityContext ) override; /* XServiceInfo */ - virtual OUString SAL_CALL getImplementationName( ) - throw (css::uno::RuntimeException) override; + virtual OUString SAL_CALL getImplementationName( ) override; - virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) - throw (css::uno::RuntimeException) override; + virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) - throw (css::uno::RuntimeException) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override; }; /// @throws css::uno::RuntimeException -OUString SEInitializer_MSCryptImpl_getImplementationName() - throw ( css::uno::RuntimeException ); +OUString SEInitializer_MSCryptImpl_getImplementationName(); -bool SAL_CALL SEInitializer_MSCryptImpl_supportsService( const OUString& ServiceName ) - throw ( css::uno::RuntimeException ); - -css::uno::Sequence< OUString > SAL_CALL SEInitializer_MSCryptImpl_getSupportedServiceNames( ) - throw ( css::uno::RuntimeException ); +/// @throws css::uno::RuntimeException +css::uno::Sequence< OUString > SAL_CALL SEInitializer_MSCryptImpl_getSupportedServiceNames( ); +/// @throws css::uno::Exception css::uno::Reference< css::uno::XInterface > -SAL_CALL SEInitializer_MSCryptImpl_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr) - throw ( css::uno::Exception ); +SAL_CALL SEInitializer_MSCryptImpl_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr); #endif diff --git a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx index c2033024f8c2..b468bf109a25 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx +++ b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx @@ -181,7 +181,7 @@ X509Certificate_MSCryptImpl::~X509Certificate_MSCryptImpl() { } //Methods from XCertificate -sal_Int16 SAL_CALL X509Certificate_MSCryptImpl::getVersion() throw ( css::uno::RuntimeException) { +sal_Int16 SAL_CALL X509Certificate_MSCryptImpl::getVersion() { if( m_pCertContext != nullptr && m_pCertContext->pCertInfo != nullptr ) { return ( char )m_pCertContext->pCertInfo->dwVersion ; } else { @@ -189,7 +189,7 @@ sal_Int16 SAL_CALL X509Certificate_MSCryptImpl::getVersion() throw ( css::uno::R } } -css::uno::Sequence< sal_Int8 > SAL_CALL X509Certificate_MSCryptImpl::getSerialNumber() throw ( css::uno::RuntimeException) { +css::uno::Sequence< sal_Int8 > SAL_CALL X509Certificate_MSCryptImpl::getSerialNumber() { if( m_pCertContext != nullptr && m_pCertContext->pCertInfo != nullptr ) { Sequence< sal_Int8 > serial( m_pCertContext->pCertInfo->SerialNumber.cbData ) ; for( unsigned int i = 0 ; i < m_pCertContext->pCertInfo->SerialNumber.cbData ; i ++ ) @@ -201,7 +201,7 @@ css::uno::Sequence< sal_Int8 > SAL_CALL X509Certificate_MSCryptImpl::getSerialNu } } -OUString SAL_CALL X509Certificate_MSCryptImpl::getIssuerName() throw ( css::uno::RuntimeException) { +OUString SAL_CALL X509Certificate_MSCryptImpl::getIssuerName() { if( m_pCertContext != nullptr && m_pCertContext->pCertInfo != nullptr ) { DWORD cbIssuer ; @@ -247,7 +247,7 @@ OUString SAL_CALL X509Certificate_MSCryptImpl::getIssuerName() throw ( css::uno: } } -OUString SAL_CALL X509Certificate_MSCryptImpl::getSubjectName() throw ( css::uno::RuntimeException) +OUString SAL_CALL X509Certificate_MSCryptImpl::getSubjectName() { if( m_pCertContext != nullptr && m_pCertContext->pCertInfo != nullptr ) { @@ -291,7 +291,7 @@ OUString SAL_CALL X509Certificate_MSCryptImpl::getSubjectName() throw ( css::uno } } -css::util::DateTime SAL_CALL X509Certificate_MSCryptImpl::getNotValidBefore() throw ( css::uno::RuntimeException ) { +css::util::DateTime SAL_CALL X509Certificate_MSCryptImpl::getNotValidBefore() { if( m_pCertContext != nullptr && m_pCertContext->pCertInfo != nullptr ) { SYSTEMTIME explTime ; DateTime dateTime ; @@ -317,7 +317,7 @@ css::util::DateTime SAL_CALL X509Certificate_MSCryptImpl::getNotValidBefore() th } } -css::util::DateTime SAL_CALL X509Certificate_MSCryptImpl::getNotValidAfter() throw ( css::uno::RuntimeException) { +css::util::DateTime SAL_CALL X509Certificate_MSCryptImpl::getNotValidAfter() { if( m_pCertContext != nullptr && m_pCertContext->pCertInfo != nullptr ) { SYSTEMTIME explTime ; DateTime dateTime ; @@ -343,7 +343,7 @@ css::util::DateTime SAL_CALL X509Certificate_MSCryptImpl::getNotValidAfter() thr } } -css::uno::Sequence< sal_Int8 > SAL_CALL X509Certificate_MSCryptImpl::getIssuerUniqueID() throw ( css::uno::RuntimeException) { +css::uno::Sequence< sal_Int8 > SAL_CALL X509Certificate_MSCryptImpl::getIssuerUniqueID() { if( m_pCertContext != nullptr && m_pCertContext->pCertInfo != nullptr ) { Sequence< sal_Int8 > issuerUid( m_pCertContext->pCertInfo->IssuerUniqueId.cbData ) ; for( unsigned int i = 0 ; i < m_pCertContext->pCertInfo->IssuerUniqueId.cbData; i ++ ) @@ -355,7 +355,7 @@ css::uno::Sequence< sal_Int8 > SAL_CALL X509Certificate_MSCryptImpl::getIssuerUn } } -css::uno::Sequence< sal_Int8 > SAL_CALL X509Certificate_MSCryptImpl::getSubjectUniqueID() throw ( css::uno::RuntimeException ) { +css::uno::Sequence< sal_Int8 > SAL_CALL X509Certificate_MSCryptImpl::getSubjectUniqueID() { if( m_pCertContext != nullptr && m_pCertContext->pCertInfo != nullptr ) { Sequence< sal_Int8 > subjectUid( m_pCertContext->pCertInfo->SubjectUniqueId.cbData ) ; for( unsigned int i = 0 ; i < m_pCertContext->pCertInfo->SubjectUniqueId.cbData; i ++ ) @@ -367,7 +367,7 @@ css::uno::Sequence< sal_Int8 > SAL_CALL X509Certificate_MSCryptImpl::getSubjectU } } -css::uno::Sequence< css::uno::Reference< css::security::XCertificateExtension > > SAL_CALL X509Certificate_MSCryptImpl::getExtensions() throw ( css::uno::RuntimeException ) { +css::uno::Sequence< css::uno::Reference< css::security::XCertificateExtension > > SAL_CALL X509Certificate_MSCryptImpl::getExtensions() { if( m_pCertContext != nullptr && m_pCertContext->pCertInfo != nullptr && m_pCertContext->pCertInfo->cExtension != 0 ) { CertificateExtension_XmlSecImpl* xExtn ; Sequence< Reference< XCertificateExtension > > xExtns( m_pCertContext->pCertInfo->cExtension ) ; @@ -396,7 +396,7 @@ css::uno::Sequence< css::uno::Reference< css::security::XCertificateExtension > } } -css::uno::Reference< css::security::XCertificateExtension > SAL_CALL X509Certificate_MSCryptImpl::findCertificateExtension( const css::uno::Sequence< sal_Int8 >& /*oid*/ ) throw (css::uno::RuntimeException) { +css::uno::Reference< css::security::XCertificateExtension > SAL_CALL X509Certificate_MSCryptImpl::findCertificateExtension( const css::uno::Sequence< sal_Int8 >& /*oid*/ ) { if( m_pCertContext != nullptr && m_pCertContext->pCertInfo != nullptr && m_pCertContext->pCertInfo->cExtension != 0 ) { CertificateExtension_XmlSecImpl* xExtn ; @@ -421,7 +421,7 @@ css::uno::Reference< css::security::XCertificateExtension > SAL_CALL X509Certifi } -css::uno::Sequence< sal_Int8 > SAL_CALL X509Certificate_MSCryptImpl::getEncoded() throw ( css::uno::RuntimeException) { +css::uno::Sequence< sal_Int8 > SAL_CALL X509Certificate_MSCryptImpl::getEncoded() { if( m_pCertContext != nullptr && m_pCertContext->cbCertEncoded > 0 ) { Sequence< sal_Int8 > rawCert( m_pCertContext->cbCertEncoded ) ; @@ -454,7 +454,7 @@ const CERT_CONTEXT* X509Certificate_MSCryptImpl::getMswcryCert() const { } } -void X509Certificate_MSCryptImpl::setRawCert( Sequence< sal_Int8 > const & rawCert ) throw ( css::uno::RuntimeException) { +void X509Certificate_MSCryptImpl::setRawCert( Sequence< sal_Int8 > const & rawCert ) { if( m_pCertContext != nullptr ) { CertFreeCertificateContext( m_pCertContext ) ; m_pCertContext = nullptr ; @@ -466,7 +466,7 @@ void X509Certificate_MSCryptImpl::setRawCert( Sequence< sal_Int8 > const & rawCe } /* XUnoTunnel */ -sal_Int64 SAL_CALL X509Certificate_MSCryptImpl::getSomething( const Sequence< sal_Int8 >& aIdentifier ) throw( RuntimeException ) { +sal_Int64 SAL_CALL X509Certificate_MSCryptImpl::getSomething( const Sequence< sal_Int8 >& aIdentifier ) { if( aIdentifier.getLength() == 16 && 0 == memcmp( getUnoTunnelId().getConstArray(), aIdentifier.getConstArray(), 16 ) ) { return reinterpret_cast<sal_Int64>(this); } @@ -535,7 +535,6 @@ css::uno::Sequence< sal_Int8 > getThumbprint(const CERT_CONTEXT* pCertContext, D } OUString SAL_CALL X509Certificate_MSCryptImpl::getSubjectPublicKeyAlgorithm() - throw ( css::uno::RuntimeException) { if( m_pCertContext != nullptr && m_pCertContext->pCertInfo != nullptr ) { @@ -549,7 +548,6 @@ OUString SAL_CALL X509Certificate_MSCryptImpl::getSubjectPublicKeyAlgorithm() } css::uno::Sequence< sal_Int8 > SAL_CALL X509Certificate_MSCryptImpl::getSubjectPublicKeyValue() - throw ( css::uno::RuntimeException) { if( m_pCertContext != nullptr && m_pCertContext->pCertInfo != nullptr ) { @@ -570,7 +568,6 @@ css::uno::Sequence< sal_Int8 > SAL_CALL X509Certificate_MSCryptImpl::getSubjectP } OUString SAL_CALL X509Certificate_MSCryptImpl::getSignatureAlgorithm() - throw ( css::uno::RuntimeException) { if( m_pCertContext != nullptr && m_pCertContext->pCertInfo != nullptr ) { @@ -583,25 +580,22 @@ OUString SAL_CALL X509Certificate_MSCryptImpl::getSignatureAlgorithm() } } -uno::Sequence<sal_Int8> X509Certificate_MSCryptImpl::getSHA256Thumbprint() throw (uno::RuntimeException, std::exception) +uno::Sequence<sal_Int8> X509Certificate_MSCryptImpl::getSHA256Thumbprint() { return getThumbprint(m_pCertContext, CERT_SHA256_HASH_PROP_ID); } css::uno::Sequence< sal_Int8 > SAL_CALL X509Certificate_MSCryptImpl::getSHA1Thumbprint() - throw ( css::uno::RuntimeException) { return getThumbprint(m_pCertContext, CERT_SHA1_HASH_PROP_ID); } css::uno::Sequence< sal_Int8 > SAL_CALL X509Certificate_MSCryptImpl::getMD5Thumbprint() - throw ( css::uno::RuntimeException) { return getThumbprint(m_pCertContext, CERT_MD5_HASH_PROP_ID); } sal_Int32 SAL_CALL X509Certificate_MSCryptImpl::getCertificateUsage( ) - throw ( css::uno::RuntimeException) { sal_Int32 usage = CERT_DATA_ENCIPHERMENT_KEY_USAGE | diff --git a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.hxx b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.hxx index 27be6535f702..f7ba8a21a3fc 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.hxx +++ b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.hxx @@ -50,36 +50,31 @@ class X509Certificate_MSCryptImpl : public ::cppu::WeakImplHelper< virtual ~X509Certificate_MSCryptImpl() override; //Methods from XCertificate - virtual sal_Int16 SAL_CALL getVersion() throw ( css::uno::RuntimeException) override; + virtual sal_Int16 SAL_CALL getVersion() override; - virtual css::uno::Sequence< sal_Int8 > SAL_CALL getSerialNumber() throw ( css::uno::RuntimeException) override; - virtual OUString SAL_CALL getIssuerName() throw ( css::uno::RuntimeException) override; - virtual OUString SAL_CALL getSubjectName() throw ( css::uno::RuntimeException) override; - virtual css::util::DateTime SAL_CALL getNotValidBefore() throw ( css::uno::RuntimeException) override; - virtual css::util::DateTime SAL_CALL getNotValidAfter() throw ( css::uno::RuntimeException) override; - virtual css::uno::Sequence< sal_Int8 > SAL_CALL getIssuerUniqueID() throw ( css::uno::RuntimeException) override; - virtual css::uno::Sequence< sal_Int8 > SAL_CALL getSubjectUniqueID() throw ( css::uno::RuntimeException) override; - virtual css::uno::Sequence< css::uno::Reference< css::security::XCertificateExtension > > SAL_CALL getExtensions() throw ( css::uno::RuntimeException) override; - virtual css::uno::Reference< css::security::XCertificateExtension > SAL_CALL findCertificateExtension( const css::uno::Sequence< sal_Int8 >& oid ) throw (css::uno::RuntimeException) override; - virtual css::uno::Sequence< sal_Int8 > SAL_CALL getEncoded() throw ( css::uno::RuntimeException) override; - virtual OUString SAL_CALL getSubjectPublicKeyAlgorithm() - throw ( css::uno::RuntimeException) override; - virtual css::uno::Sequence< sal_Int8 > SAL_CALL getSubjectPublicKeyValue() - throw ( css::uno::RuntimeException) override; - virtual OUString SAL_CALL getSignatureAlgorithm() - throw ( css::uno::RuntimeException) override; - virtual css::uno::Sequence< sal_Int8 > SAL_CALL getSHA1Thumbprint() - throw ( css::uno::RuntimeException) override; - virtual css::uno::Sequence< sal_Int8 > SAL_CALL getMD5Thumbprint() - throw ( css::uno::RuntimeException) override; + virtual css::uno::Sequence< sal_Int8 > SAL_CALL getSerialNumber() override; + virtual OUString SAL_CALL getIssuerName() override; + virtual OUString SAL_CALL getSubjectName() override; + virtual css::util::DateTime SAL_CALL getNotValidBefore() override; + virtual css::util::DateTime SAL_CALL getNotValidAfter() override; + virtual css::uno::Sequence< sal_Int8 > SAL_CALL getIssuerUniqueID() override; + virtual css::uno::Sequence< sal_Int8 > SAL_CALL getSubjectUniqueID() override; + virtual css::uno::Sequence< css::uno::Reference< css::security::XCertificateExtension > > SAL_CALL getExtensions() override; + virtual css::uno::Reference< css::security::XCertificateExtension > SAL_CALL findCertificateExtension( const css::uno::Sequence< sal_Int8 >& oid ) override; + virtual css::uno::Sequence< sal_Int8 > SAL_CALL getEncoded() override; + virtual OUString SAL_CALL getSubjectPublicKeyAlgorithm() override; + virtual css::uno::Sequence< sal_Int8 > SAL_CALL getSubjectPublicKeyValue() override; + virtual OUString SAL_CALL getSignatureAlgorithm() override; + virtual css::uno::Sequence< sal_Int8 > SAL_CALL getSHA1Thumbprint() override; + virtual css::uno::Sequence< sal_Int8 > SAL_CALL getMD5Thumbprint() override; - virtual sal_Int32 SAL_CALL getCertificateUsage( ) throw ( css::uno::RuntimeException) override; + virtual sal_Int32 SAL_CALL getCertificateUsage( ) override; //Methods from XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) throw (css::uno::RuntimeException) override; + virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override; /// @see xmlsecurity::Certificate::getSHA256Thumbprint(). - virtual css::uno::Sequence<sal_Int8> getSHA256Thumbprint() throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence<sal_Int8> getSHA256Thumbprint() override; static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId() ; static X509Certificate_MSCryptImpl* getImplementation( const css::uno::Reference< css::uno::XInterface >& rObj ) ; @@ -88,7 +83,7 @@ class X509Certificate_MSCryptImpl : public ::cppu::WeakImplHelper< void setMswcryCert( const CERT_CONTEXT* cert ) ; const CERT_CONTEXT* getMswcryCert() const ; /// @throws css::uno::RuntimeException - void setRawCert( css::uno::Sequence< sal_Int8 > const & rawCert ) throw ( css::uno::RuntimeException) ; + void setRawCert( css::uno::Sequence< sal_Int8 > const & rawCert ) ; } ; #endif // INCLUDED_XMLSECURITY_SOURCE_XMLSEC_MSCRYPT_X509CERTIFICATE_MSCRYPTIMPL_HXX diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx index 7d5fd3ef32b3..6e520d6503af 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx +++ b/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx @@ -58,8 +58,7 @@ Reference< XXMLEncryptionTemplate > SAL_CALL XMLEncryption_MSCryptImpl::encrypt( const Reference< XXMLEncryptionTemplate >& aTemplate , const Reference< XSecurityEnvironment >& aEnvironment -) throw( css::xml::crypto::XMLEncryptionException, - css::uno::SecurityException ) +) { xmlSecKeysMngrPtr pMngr = nullptr ; xmlSecEncCtxPtr pEncCtx = nullptr ; @@ -194,8 +193,7 @@ Reference< XXMLEncryptionTemplate > SAL_CALL XMLEncryption_MSCryptImpl::decrypt( const Reference< XXMLEncryptionTemplate >& aTemplate , const Reference< XXMLSecurityContext >& aSecurityCtx -) throw( css::xml::crypto::XMLEncryptionException , - css::uno::SecurityException) { +) { xmlSecKeysMngrPtr pMngr = nullptr ; xmlSecEncCtxPtr pEncCtx = nullptr ; xmlNodePtr pEncryptedData = nullptr ; @@ -320,12 +318,12 @@ XMLEncryption_MSCryptImpl::decrypt( } /* XServiceInfo */ -OUString SAL_CALL XMLEncryption_MSCryptImpl::getImplementationName() throw( RuntimeException ) { +OUString SAL_CALL XMLEncryption_MSCryptImpl::getImplementationName() { return impl_getImplementationName() ; } /* XServiceInfo */ -sal_Bool SAL_CALL XMLEncryption_MSCryptImpl::supportsService( const OUString& serviceName) throw( RuntimeException ) { +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 ++ ) { @@ -336,7 +334,7 @@ sal_Bool SAL_CALL XMLEncryption_MSCryptImpl::supportsService( const OUString& se } /* XServiceInfo */ -Sequence< OUString > SAL_CALL XMLEncryption_MSCryptImpl::getSupportedServiceNames() throw( RuntimeException ) { +Sequence< OUString > SAL_CALL XMLEncryption_MSCryptImpl::getSupportedServiceNames() { return impl_getSupportedServiceNames() ; } @@ -347,12 +345,12 @@ Sequence< OUString > XMLEncryption_MSCryptImpl::impl_getSupportedServiceNames() return seqServiceNames ; } -OUString XMLEncryption_MSCryptImpl::impl_getImplementationName() throw( RuntimeException ) { +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 ) throw( RuntimeException ) { +Reference< XInterface > SAL_CALL XMLEncryption_MSCryptImpl::impl_createInstance( const Reference< XMultiServiceFactory >& aServiceManager ) { return Reference< XInterface >( *new XMLEncryption_MSCryptImpl( aServiceManager ) ) ; } diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.hxx b/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.hxx index 5d773a29573a..c445cea1bdc8 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.hxx +++ b/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.hxx @@ -50,32 +50,31 @@ class XMLEncryption_MSCryptImpl : public ::cppu::WeakImplHelper< 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 ) ; - throw ( css::xml::crypto::XMLEncryptionException , - css::uno::SecurityException) override; + 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 - ) throw( css::xml::crypto::XMLEncryptionException , - css::uno::SecurityException) override; + ) override; //Methods from XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException ) override; + virtual OUString SAL_CALL getImplementationName() override; virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName - ) throw( css::uno::RuntimeException ) override; + ) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException ) 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() throw( css::uno::RuntimeException ) ; + 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 ) throw( css::uno::RuntimeException ) ; + /// @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 ) ; } ; diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.cxx index e1de76a5473d..df5fb696db25 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.cxx +++ b/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.cxx @@ -65,7 +65,6 @@ XMLSecurityContext_MSCryptImpl::~XMLSecurityContext_MSCryptImpl() { sal_Int32 SAL_CALL XMLSecurityContext_MSCryptImpl::addSecurityEnvironment( const css::uno::Reference< css::xml::crypto::XSecurityEnvironment >& aSecurityEnvironment) - throw (css::security::SecurityInfrastructureException, css::uno::RuntimeException) { if( !aSecurityEnvironment.is() ) { @@ -79,14 +78,12 @@ sal_Int32 SAL_CALL XMLSecurityContext_MSCryptImpl::addSecurityEnvironment( sal_Int32 SAL_CALL XMLSecurityContext_MSCryptImpl::getSecurityEnvironmentNumber( ) - throw (css::uno::RuntimeException) { return 1; } css::uno::Reference< css::xml::crypto::XSecurityEnvironment > SAL_CALL XMLSecurityContext_MSCryptImpl::getSecurityEnvironmentByIndex( sal_Int32 index ) - throw (css::uno::RuntimeException) { if (index == 0) { @@ -98,30 +95,27 @@ css::uno::Reference< css::xml::crypto::XSecurityEnvironment > SAL_CALL css::uno::Reference< css::xml::crypto::XSecurityEnvironment > SAL_CALL XMLSecurityContext_MSCryptImpl::getSecurityEnvironment( ) - throw (css::uno::RuntimeException) { return m_xSecurityEnvironment; } sal_Int32 SAL_CALL XMLSecurityContext_MSCryptImpl::getDefaultSecurityEnvironmentIndex( ) - throw (css::uno::RuntimeException) { return 0; } void SAL_CALL XMLSecurityContext_MSCryptImpl::setDefaultSecurityEnvironmentIndex( sal_Int32 /*nDefaultEnvIndex*/ ) - throw (css::uno::RuntimeException) { //dummy } /* XServiceInfo */ -OUString SAL_CALL XMLSecurityContext_MSCryptImpl::getImplementationName() throw( RuntimeException ) { +OUString SAL_CALL XMLSecurityContext_MSCryptImpl::getImplementationName() { return impl_getImplementationName() ; } /* XServiceInfo */ -sal_Bool SAL_CALL XMLSecurityContext_MSCryptImpl::supportsService( const OUString& serviceName) throw( RuntimeException ) { +sal_Bool SAL_CALL XMLSecurityContext_MSCryptImpl::supportsService( const OUString& serviceName) { Sequence< OUString > seqServiceNames = getSupportedServiceNames() ; const OUString* pArray = seqServiceNames.getConstArray() ; for( sal_Int32 i = 0 ; i < seqServiceNames.getLength() ; i ++ ) { @@ -132,7 +126,7 @@ sal_Bool SAL_CALL XMLSecurityContext_MSCryptImpl::supportsService( const OUStrin } /* XServiceInfo */ -Sequence< OUString > SAL_CALL XMLSecurityContext_MSCryptImpl::getSupportedServiceNames() throw( RuntimeException ) { +Sequence< OUString > SAL_CALL XMLSecurityContext_MSCryptImpl::getSupportedServiceNames() { return impl_getSupportedServiceNames() ; } @@ -143,12 +137,12 @@ Sequence< OUString > XMLSecurityContext_MSCryptImpl::impl_getSupportedServiceNam return seqServiceNames ; } -OUString XMLSecurityContext_MSCryptImpl::impl_getImplementationName() throw( RuntimeException ) { +OUString XMLSecurityContext_MSCryptImpl::impl_getImplementationName() { return OUString("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_MSCryptImpl") ; } //Helper for registry -Reference< XInterface > SAL_CALL XMLSecurityContext_MSCryptImpl::impl_createInstance( const Reference< XMultiServiceFactory >& ) throw( RuntimeException ) { +Reference< XInterface > SAL_CALL XMLSecurityContext_MSCryptImpl::impl_createInstance( const Reference< XMultiServiceFactory >& ) { return Reference< XInterface >( *new XMLSecurityContext_MSCryptImpl ) ; } diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.hxx b/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.hxx index 4ed4153bca54..3f9bc3c40ba7 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.hxx +++ b/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.hxx @@ -50,45 +50,41 @@ class XMLSecurityContext_MSCryptImpl : public ::cppu::WeakImplHelper< //Methods from XXMLSecurityContext virtual sal_Int32 SAL_CALL addSecurityEnvironment( const css::uno::Reference< css::xml::crypto::XSecurityEnvironment >& aSecurityEnvironment - ) throw (css::security::SecurityInfrastructureException, css::uno::RuntimeException) override; + ) override; - virtual ::sal_Int32 SAL_CALL getSecurityEnvironmentNumber( ) - throw (css::uno::RuntimeException) override; + virtual ::sal_Int32 SAL_CALL getSecurityEnvironmentNumber( ) override; virtual css::uno::Reference< css::xml::crypto::XSecurityEnvironment > SAL_CALL - getSecurityEnvironmentByIndex( ::sal_Int32 index ) - throw (css::uno::RuntimeException) override; + getSecurityEnvironmentByIndex( ::sal_Int32 index ) override; virtual css::uno::Reference< css::xml::crypto::XSecurityEnvironment > SAL_CALL - getSecurityEnvironment( ) - throw (css::uno::RuntimeException) override; + getSecurityEnvironment( ) override; - virtual ::sal_Int32 SAL_CALL getDefaultSecurityEnvironmentIndex( ) - throw (css::uno::RuntimeException) override; + virtual ::sal_Int32 SAL_CALL getDefaultSecurityEnvironmentIndex( ) override; - virtual void SAL_CALL setDefaultSecurityEnvironmentIndex( sal_Int32 nDefaultEnvIndex ) - throw (css::uno::RuntimeException) override; + virtual void SAL_CALL setDefaultSecurityEnvironmentIndex( sal_Int32 nDefaultEnvIndex ) override; //Methods from XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException ) override; + virtual OUString SAL_CALL getImplementationName() override; virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName - ) throw( css::uno::RuntimeException ) override; + ) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException ) 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() throw( css::uno::RuntimeException ) ; + 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 ) throw( css::uno::RuntimeException ) ; + /// @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 ) ; diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx index ac5ffda6f87b..7b6ee686a05c 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx +++ b/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx @@ -55,8 +55,7 @@ Reference< XXMLSignatureTemplate > SAL_CALL XMLSignature_MSCryptImpl::generate( const Reference< XXMLSignatureTemplate >& aTemplate , const Reference< XSecurityEnvironment >& aEnvironment -) throw( css::xml::crypto::XMLSignatureException, - css::uno::SecurityException ) +) { xmlSecKeysMngrPtr pMngr = nullptr ; xmlSecDSigCtxPtr pDsigCtx = nullptr ; @@ -151,9 +150,7 @@ Reference< XXMLSignatureTemplate > SAL_CALL XMLSignature_MSCryptImpl::validate( const Reference< XXMLSignatureTemplate >& aTemplate , const Reference< XXMLSecurityContext >& aSecurityCtx -) throw( css::uno::RuntimeException, - css::uno::SecurityException, - css::xml::crypto::XMLSignatureException ) { +) { xmlSecKeysMngrPtr pMngr = nullptr ; xmlSecDSigCtxPtr pDsigCtx = nullptr ; xmlNodePtr pNode = nullptr ; @@ -265,12 +262,12 @@ SAL_CALL XMLSignature_MSCryptImpl::validate( } /* XServiceInfo */ -OUString SAL_CALL XMLSignature_MSCryptImpl::getImplementationName() throw( RuntimeException ) { +OUString SAL_CALL XMLSignature_MSCryptImpl::getImplementationName() { return impl_getImplementationName() ; } /* XServiceInfo */ -sal_Bool SAL_CALL XMLSignature_MSCryptImpl::supportsService( const OUString& serviceName) throw( RuntimeException ) { +sal_Bool SAL_CALL XMLSignature_MSCryptImpl::supportsService( const OUString& serviceName) { Sequence< OUString > seqServiceNames = getSupportedServiceNames() ; const OUString* pArray = seqServiceNames.getConstArray() ; for( sal_Int32 i = 0 ; i < seqServiceNames.getLength() ; i ++ ) { @@ -281,7 +278,7 @@ sal_Bool SAL_CALL XMLSignature_MSCryptImpl::supportsService( const OUString& ser } /* XServiceInfo */ -Sequence< OUString > SAL_CALL XMLSignature_MSCryptImpl::getSupportedServiceNames() throw( RuntimeException ) { +Sequence< OUString > SAL_CALL XMLSignature_MSCryptImpl::getSupportedServiceNames() { return impl_getSupportedServiceNames() ; } @@ -292,12 +289,12 @@ Sequence< OUString > XMLSignature_MSCryptImpl::impl_getSupportedServiceNames() { return seqServiceNames ; } -OUString XMLSignature_MSCryptImpl::impl_getImplementationName() throw( RuntimeException ) { +OUString XMLSignature_MSCryptImpl::impl_getImplementationName() { return OUString("com.sun.star.xml.security.bridge.xmlsec.XMLSignature_MSCryptImpl") ; } //Helper for registry -Reference< XInterface > SAL_CALL XMLSignature_MSCryptImpl::impl_createInstance( const Reference< XMultiServiceFactory >& aServiceManager ) throw( RuntimeException ) { +Reference< XInterface > SAL_CALL XMLSignature_MSCryptImpl::impl_createInstance( const Reference< XMultiServiceFactory >& aServiceManager ) { return Reference< XInterface >( *new XMLSignature_MSCryptImpl( aServiceManager ) ) ; } diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.hxx b/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.hxx index 32def55df640..a5cb5c6398a7 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.hxx +++ b/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.hxx @@ -49,33 +49,31 @@ class XMLSignature_MSCryptImpl : public ::cppu::WeakImplHelper< virtual css::uno::Reference< css::xml::crypto::XXMLSignatureTemplate > SAL_CALL generate( const css::uno::Reference< css::xml::crypto::XXMLSignatureTemplate >& aTemplate , const css::uno::Reference< css::xml::crypto::XSecurityEnvironment >& aEnvironment - ) throw( css::xml::crypto::XMLSignatureException, - css::uno::SecurityException) override; + ) override; virtual css::uno::Reference< css::xml::crypto::XXMLSignatureTemplate > SAL_CALL validate( const css::uno::Reference< css::xml::crypto::XXMLSignatureTemplate >& aTemplate , const css::uno::Reference< css::xml::crypto::XXMLSecurityContext >& aContext - ) throw( css::uno::RuntimeException, - css::uno::SecurityException, - css::xml::crypto::XMLSignatureException) override; + ) override; //Methods from XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException ) override; + virtual OUString SAL_CALL getImplementationName() override; virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName - ) throw( css::uno::RuntimeException ) override; + ) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException ) 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() throw( css::uno::RuntimeException ) ; + 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 ) throw( css::uno::RuntimeException ) ; + /// @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 ) ; } ; diff --git a/xmlsecurity/source/xmlsec/nss/ciphercontext.cxx b/xmlsecurity/source/xmlsec/nss/ciphercontext.cxx index 6d9d40ade222..c1532d77bea3 100644 --- a/xmlsecurity/source/xmlsec/nss/ciphercontext.cxx +++ b/xmlsecurity/source/xmlsec/nss/ciphercontext.cxx @@ -91,7 +91,6 @@ void OCipherContext::Dispose() } uno::Sequence< ::sal_Int8 > SAL_CALL OCipherContext::convertWithCipherContext( const uno::Sequence< ::sal_Int8 >& aData ) - throw ( lang::IllegalArgumentException, lang::DisposedException, uno::RuntimeException, std::exception) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -172,7 +171,6 @@ uno::Sequence< ::sal_Int8 > SAL_CALL OCipherContext::convertWithCipherContext( c } uno::Sequence< ::sal_Int8 > SAL_CALL OCipherContext::finalizeCipherContextAndDispose() - throw (lang::DisposedException, uno::RuntimeException, std::exception) { ::osl::MutexGuard aGuard( m_aMutex ); diff --git a/xmlsecurity/source/xmlsec/nss/ciphercontext.hxx b/xmlsecurity/source/xmlsec/nss/ciphercontext.hxx index 9d8d54535caf..a7a4e6dad54e 100644 --- a/xmlsecurity/source/xmlsec/nss/ciphercontext.hxx +++ b/xmlsecurity/source/xmlsec/nss/ciphercontext.hxx @@ -73,8 +73,8 @@ public: static css::uno::Reference< css::xml::crypto::XCipherContext > Create( CK_MECHANISM_TYPE nNSSCipherID, const css::uno::Sequence< ::sal_Int8 >& aKey, const css::uno::Sequence< ::sal_Int8 >& aInitializationVector, bool bEncryption, bool bW3CPadding ); // XCipherContext - virtual css::uno::Sequence< ::sal_Int8 > SAL_CALL convertWithCipherContext( const css::uno::Sequence< ::sal_Int8 >& aData ) throw (css::lang::IllegalArgumentException, css::lang::DisposedException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< ::sal_Int8 > SAL_CALL finalizeCipherContextAndDispose( ) throw (css::lang::DisposedException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< ::sal_Int8 > SAL_CALL convertWithCipherContext( const css::uno::Sequence< ::sal_Int8 >& aData ) override; + virtual css::uno::Sequence< ::sal_Int8 > SAL_CALL finalizeCipherContextAndDispose( ) override; }; #endif diff --git a/xmlsecurity/source/xmlsec/nss/digestcontext.cxx b/xmlsecurity/source/xmlsec/nss/digestcontext.cxx index 86f8c77b6f63..538452e641c2 100644 --- a/xmlsecurity/source/xmlsec/nss/digestcontext.cxx +++ b/xmlsecurity/source/xmlsec/nss/digestcontext.cxx @@ -33,7 +33,6 @@ ODigestContext::~ODigestContext() } void SAL_CALL ODigestContext::updateDigest( const uno::Sequence< ::sal_Int8 >& aData ) - throw (lang::DisposedException, uno::RuntimeException, std::exception) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -62,7 +61,6 @@ void SAL_CALL ODigestContext::updateDigest( const uno::Sequence< ::sal_Int8 >& a } uno::Sequence< ::sal_Int8 > SAL_CALL ODigestContext::finalizeDigestAndDispose() - throw (lang::DisposedException, uno::RuntimeException, std::exception) { ::osl::MutexGuard aGuard( m_aMutex ); diff --git a/xmlsecurity/source/xmlsec/nss/digestcontext.hxx b/xmlsecurity/source/xmlsec/nss/digestcontext.hxx index 59074b282d08..7e20cd8d99d0 100644 --- a/xmlsecurity/source/xmlsec/nss/digestcontext.hxx +++ b/xmlsecurity/source/xmlsec/nss/digestcontext.hxx @@ -52,8 +52,8 @@ public: // XDigestContext - virtual void SAL_CALL updateDigest( const css::uno::Sequence< ::sal_Int8 >& aData ) throw (css::lang::DisposedException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< ::sal_Int8 > SAL_CALL finalizeDigestAndDispose() throw (css::lang::DisposedException, css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL updateDigest( const css::uno::Sequence< ::sal_Int8 >& aData ) override; + virtual css::uno::Sequence< ::sal_Int8 > SAL_CALL finalizeDigestAndDispose() override; }; #endif diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx index 136c8d6b79d6..c25bc9fe973b 100644 --- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx +++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx @@ -393,7 +393,6 @@ bool ONSSInitializer::initNSS( const css::uno::Reference< css::uno::XComponentCo } css::uno::Reference< css::xml::crypto::XDigestContext > SAL_CALL ONSSInitializer::getDigestContext( ::sal_Int32 nDigestID, const css::uno::Sequence< css::beans::NamedValue >& aParams ) - throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) { SECOidTag nNSSDigestID = SEC_OID_UNKNOWN; sal_Int32 nDigestLength = 0; @@ -430,7 +429,6 @@ css::uno::Reference< css::xml::crypto::XDigestContext > SAL_CALL ONSSInitializer } css::uno::Reference< css::xml::crypto::XCipherContext > SAL_CALL ONSSInitializer::getCipherContext( ::sal_Int32 nCipherID, const css::uno::Sequence< ::sal_Int8 >& aKey, const css::uno::Sequence< ::sal_Int8 >& aInitializationVector, sal_Bool bEncryption, const css::uno::Sequence< css::beans::NamedValue >& aParams ) - throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) { CK_MECHANISM_TYPE nNSSCipherID = 0; bool bW3CPadding = false; @@ -461,40 +459,34 @@ css::uno::Reference< css::xml::crypto::XCipherContext > SAL_CALL ONSSInitializer } OUString ONSSInitializer_getImplementationName () - throw (cssu::RuntimeException) { return OUString ( IMPLEMENTATION_NAME ); } cssu::Sequence< OUString > SAL_CALL ONSSInitializer_getSupportedServiceNames( ) - throw (cssu::RuntimeException) { cssu::Sequence<OUString> aRet { NSS_SERVICE_NAME }; return aRet; } cssu::Reference< cssu::XInterface > SAL_CALL ONSSInitializer_createInstance( const cssu::Reference< cssl::XMultiServiceFactory > & rSMgr) - throw( cssu::Exception ) { return static_cast<cppu::OWeakObject*>(new ONSSInitializer( comphelper::getComponentContext(rSMgr) )); } /* XServiceInfo */ OUString SAL_CALL ONSSInitializer::getImplementationName() - throw (cssu::RuntimeException, std::exception) { return ONSSInitializer_getImplementationName(); } sal_Bool SAL_CALL ONSSInitializer::supportsService( const OUString& rServiceName ) - throw (cssu::RuntimeException, std::exception) { return cppu::supportsService(this, rServiceName); } cssu::Sequence< OUString > SAL_CALL ONSSInitializer::getSupportedServiceNames( ) - throw (cssu::RuntimeException, std::exception) { return ONSSInitializer_getSupportedServiceNames(); } diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.hxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.hxx index d7fd1737bf3d..9e07b6eda444 100644 --- a/xmlsecurity/source/xmlsec/nss/nssinitializer.hxx +++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.hxx @@ -47,34 +47,28 @@ public: static bool initNSS( const css::uno::Reference< css::uno::XComponentContext > &rxContext ); /* XDigestContextSupplier */ - virtual css::uno::Reference< css::xml::crypto::XDigestContext > SAL_CALL getDigestContext( ::sal_Int32 nDigestID, const css::uno::Sequence< css::beans::NamedValue >& aParams ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::xml::crypto::XDigestContext > SAL_CALL getDigestContext( ::sal_Int32 nDigestID, const css::uno::Sequence< css::beans::NamedValue >& aParams ) override; /* XCipherContextSupplier */ - virtual css::uno::Reference< css::xml::crypto::XCipherContext > SAL_CALL getCipherContext( ::sal_Int32 nCipherID, const css::uno::Sequence< ::sal_Int8 >& aKey, const css::uno::Sequence< ::sal_Int8 >& aInitializationVector, sal_Bool bEncryption, const css::uno::Sequence< css::beans::NamedValue >& aParams ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::xml::crypto::XCipherContext > SAL_CALL getCipherContext( ::sal_Int32 nCipherID, const css::uno::Sequence< ::sal_Int8 >& aKey, const css::uno::Sequence< ::sal_Int8 >& aInitializationVector, sal_Bool bEncryption, const css::uno::Sequence< css::beans::NamedValue >& aParams ) override; /* XServiceInfo */ - virtual OUString SAL_CALL getImplementationName() - throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getImplementationName() override; - virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) - throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() - throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; }; /// @throws css::uno::RuntimeException -OUString ONSSInitializer_getImplementationName() - throw ( css::uno::RuntimeException ); +OUString ONSSInitializer_getImplementationName(); /// @throws css::uno::RuntimeException -css::uno::Sequence< OUString > SAL_CALL ONSSInitializer_getSupportedServiceNames() - throw ( css::uno::RuntimeException ); +css::uno::Sequence< OUString > SAL_CALL ONSSInitializer_getSupportedServiceNames(); /// @throws css::uno::Exception css::uno::Reference< css::uno::XInterface > -SAL_CALL ONSSInitializer_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr ) - throw ( css::uno::Exception ); +SAL_CALL ONSSInitializer_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr ); #endif diff --git a/xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.cxx index fc0e05e3ff1e..a1d4200214e5 100644 --- a/xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.cxx @@ -58,7 +58,7 @@ namespace { } //Methods from XSanExtension -css::uno::Sequence< css::security::CertAltNameEntry > SAL_CALL SanExtensionImpl::getAlternativeNames() throw( css::uno::RuntimeException, std::exception ) +css::uno::Sequence< css::security::CertAltNameEntry > SAL_CALL SanExtensionImpl::getAlternativeNames() { if (m_Entries.empty()) { diff --git a/xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.hxx b/xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.hxx index df81eee47408..3e2d85b739e4 100644 --- a/xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.hxx +++ b/xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.hxx @@ -43,17 +43,17 @@ class SanExtensionImpl : public ::cppu::WeakImplHelper< public: //Methods from XCertificateExtension - virtual sal_Bool SAL_CALL isCritical() throw( css::uno::RuntimeException, std::exception ) override + virtual sal_Bool SAL_CALL isCritical() override { return m_Extn.m_critical; } - virtual css::uno::Sequence< sal_Int8 > SAL_CALL getExtensionId() throw( css::uno::RuntimeException, std::exception ) override + virtual css::uno::Sequence< sal_Int8 > SAL_CALL getExtensionId() override { return m_Extn.m_xExtnId; } - virtual css::uno::Sequence< sal_Int8 > SAL_CALL getExtensionValue() throw( css::uno::RuntimeException, std::exception ) override + virtual css::uno::Sequence< sal_Int8 > SAL_CALL getExtensionValue() override { return m_Extn.m_xExtnValue; } @@ -65,7 +65,7 @@ class SanExtensionImpl : public ::cppu::WeakImplHelper< //Methods from XSanExtension - virtual css::uno::Sequence< css::security::CertAltNameEntry > SAL_CALL getAlternativeNames() throw( css::uno::RuntimeException, std::exception ) override ; + virtual css::uno::Sequence< css::security::CertAltNameEntry > SAL_CALL getAlternativeNames() override ; } ; #endif // INCLUDED_XMLSECURITY_SOURCE_XMLSEC_NSS_SANEXTENSION_NSSIMPL_HXX diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx index f5eb1d2ebfb5..769d183b17fe 100644 --- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx @@ -142,12 +142,12 @@ SecurityEnvironment_NssImpl::~SecurityEnvironment_NssImpl() { } /* XServiceInfo */ -OUString SAL_CALL SecurityEnvironment_NssImpl::getImplementationName() throw( RuntimeException, std::exception ) { +OUString SAL_CALL SecurityEnvironment_NssImpl::getImplementationName() { return impl_getImplementationName() ; } /* XServiceInfo */ -sal_Bool SAL_CALL SecurityEnvironment_NssImpl::supportsService( const OUString& serviceName) throw( RuntimeException, std::exception ) { +sal_Bool SAL_CALL SecurityEnvironment_NssImpl::supportsService( const OUString& serviceName) { Sequence< OUString > seqServiceNames = getSupportedServiceNames() ; const OUString* pArray = seqServiceNames.getConstArray() ; for( sal_Int32 i = 0 ; i < seqServiceNames.getLength() ; i ++ ) { @@ -158,7 +158,7 @@ sal_Bool SAL_CALL SecurityEnvironment_NssImpl::supportsService( const OUString& } /* XServiceInfo */ -Sequence< OUString > SAL_CALL SecurityEnvironment_NssImpl::getSupportedServiceNames() throw( RuntimeException, std::exception ) { +Sequence< OUString > SAL_CALL SecurityEnvironment_NssImpl::getSupportedServiceNames() { return impl_getSupportedServiceNames() ; } @@ -169,12 +169,12 @@ Sequence< OUString > SecurityEnvironment_NssImpl::impl_getSupportedServiceNames( return seqServiceNames ; } -OUString SecurityEnvironment_NssImpl::impl_getImplementationName() throw( RuntimeException ) { +OUString SecurityEnvironment_NssImpl::impl_getImplementationName() { return OUString("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_NssImpl") ; } //Helper for registry -Reference< XInterface > SAL_CALL SecurityEnvironment_NssImpl::impl_createInstance( const Reference< XMultiServiceFactory >& ) throw( RuntimeException ) { +Reference< XInterface > SAL_CALL SecurityEnvironment_NssImpl::impl_createInstance( const Reference< XMultiServiceFactory >& ) { return Reference< XInterface >( *new SecurityEnvironment_NssImpl ) ; } @@ -184,7 +184,6 @@ Reference< XSingleServiceFactory > SecurityEnvironment_NssImpl::impl_createFacto /* XUnoTunnel */ sal_Int64 SAL_CALL SecurityEnvironment_NssImpl::getSomething( const Sequence< sal_Int8 >& aIdentifier ) - throw( RuntimeException, std::exception ) { if( aIdentifier.getLength() == 16 && 0 == memcmp( getUnoTunnelId().getConstArray(), aIdentifier.getConstArray(), 16 ) ) { return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_uIntPtr>(this)); @@ -203,7 +202,7 @@ const Sequence< sal_Int8>& SecurityEnvironment_NssImpl::getUnoTunnelId() { return theSecurityEnvironment_NssImplUnoTunnelId::get().getSeq(); } -OUString SecurityEnvironment_NssImpl::getSecurityEnvironmentInformation() throw( css::uno::RuntimeException, std::exception ) +OUString SecurityEnvironment_NssImpl::getSecurityEnvironmentInformation() { OUStringBuffer buff; for (CIT_SLOTS is = m_Slots.begin(); is != m_Slots.end(); is++) @@ -214,18 +213,18 @@ OUString SecurityEnvironment_NssImpl::getSecurityEnvironmentInformation() throw( return buff.makeStringAndClear(); } -void SecurityEnvironment_NssImpl::addCryptoSlot( PK11SlotInfo* aSlot) throw( Exception , RuntimeException ) +void SecurityEnvironment_NssImpl::addCryptoSlot( PK11SlotInfo* aSlot) { PK11_ReferenceSlot(aSlot); m_Slots.push_back(aSlot); } //Could we have multiple cert dbs? -void SecurityEnvironment_NssImpl::setCertDb( CERTCertDBHandle* aCertDb ) throw( Exception , RuntimeException ) { +void SecurityEnvironment_NssImpl::setCertDb( CERTCertDBHandle* aCertDb ) { m_pHandler = aCertDb ; } -void SecurityEnvironment_NssImpl::adoptSymKey( PK11SymKey* aSymKey ) throw( Exception , RuntimeException ) { +void SecurityEnvironment_NssImpl::adoptSymKey( PK11SymKey* aSymKey ) { std::list< PK11SymKey* >::iterator keyIt ; if( aSymKey != nullptr ) { @@ -248,7 +247,7 @@ void SecurityEnvironment_NssImpl::adoptSymKey( PK11SymKey* aSymKey ) throw( Exce } } -PK11SymKey* SecurityEnvironment_NssImpl::getSymKey( unsigned int position ) throw( Exception , RuntimeException ) { +PK11SymKey* SecurityEnvironment_NssImpl::getSymKey( unsigned int position ) { PK11SymKey* symkey ; std::list< PK11SymKey* >::iterator keyIt ; unsigned int pos ; @@ -262,7 +261,7 @@ PK11SymKey* SecurityEnvironment_NssImpl::getSymKey( unsigned int position ) thro return symkey ; } -SECKEYPublicKey* SecurityEnvironment_NssImpl::getPubKey( unsigned int position ) throw( Exception , RuntimeException ) { +SECKEYPublicKey* SecurityEnvironment_NssImpl::getPubKey( unsigned int position ) { SECKEYPublicKey* pubkey ; std::list< SECKEYPublicKey* >::iterator keyIt ; unsigned int pos ; @@ -276,7 +275,7 @@ SECKEYPublicKey* SecurityEnvironment_NssImpl::getPubKey( unsigned int position ) return pubkey ; } -SECKEYPrivateKey* SecurityEnvironment_NssImpl::getPriKey( unsigned int position ) throw( css::uno::Exception , css::uno::RuntimeException ) { +SECKEYPrivateKey* SecurityEnvironment_NssImpl::getPriKey( unsigned int position ) { SECKEYPrivateKey* prikey ; std::list< SECKEYPrivateKey* >::iterator keyIt ; unsigned int pos ; @@ -346,7 +345,7 @@ void SecurityEnvironment_NssImpl::updateSlots() } Sequence< Reference < XCertificate > > -SecurityEnvironment_NssImpl::getPersonalCertificates() throw( SecurityException , RuntimeException, std::exception ) +SecurityEnvironment_NssImpl::getPersonalCertificates() { sal_Int32 length ; X509Certificate_NssImpl* xcert ; @@ -413,7 +412,7 @@ SecurityEnvironment_NssImpl::getPersonalCertificates() throw( SecurityException return Sequence< Reference < XCertificate > > (); } -Reference< XCertificate > SecurityEnvironment_NssImpl::getCertificate( const OUString& issuerName, const Sequence< sal_Int8 >& serialNumber ) throw( SecurityException , RuntimeException, std::exception ) +Reference< XCertificate > SecurityEnvironment_NssImpl::getCertificate( const OUString& issuerName, const Sequence< sal_Int8 >& serialNumber ) { X509Certificate_NssImpl* xcert = nullptr; @@ -474,7 +473,7 @@ Reference< XCertificate > SecurityEnvironment_NssImpl::getCertificate( const OUS return xcert ; } -Sequence< Reference < XCertificate > > SecurityEnvironment_NssImpl::buildCertificatePath( const Reference< XCertificate >& begin ) throw( SecurityException , RuntimeException, std::exception ) { +Sequence< Reference < XCertificate > > SecurityEnvironment_NssImpl::buildCertificatePath( const Reference< XCertificate >& begin ) { const X509Certificate_NssImpl* xcert ; const CERTCertificate* cert ; CERTCertList* certChain ; @@ -530,7 +529,7 @@ Sequence< Reference < XCertificate > > SecurityEnvironment_NssImpl::buildCertifi return Sequence< Reference < XCertificate > >(); } -Reference< XCertificate > SecurityEnvironment_NssImpl::createCertificateFromRaw( const Sequence< sal_Int8 >& rawCertificate ) throw( SecurityException , RuntimeException, std::exception ) { +Reference< XCertificate > SecurityEnvironment_NssImpl::createCertificateFromRaw( const Sequence< sal_Int8 >& rawCertificate ) { X509Certificate_NssImpl* xcert ; if( rawCertificate.getLength() > 0 ) { @@ -546,7 +545,7 @@ Reference< XCertificate > SecurityEnvironment_NssImpl::createCertificateFromRaw( return xcert ; } -Reference< XCertificate > SecurityEnvironment_NssImpl::createCertificateFromAscii( const OUString& asciiCertificate ) throw( SecurityException , RuntimeException, std::exception ) +Reference< XCertificate > SecurityEnvironment_NssImpl::createCertificateFromAscii( const OUString& asciiCertificate ) { OString oscert = OUStringToOString( asciiCertificate , RTL_TEXTENCODING_ASCII_US ) ; xmlChar* chCert = xmlStrndup( reinterpret_cast<const xmlChar*>(oscert.getStr()), ( int )oscert.getLength() ) ; @@ -570,7 +569,6 @@ Reference< XCertificate > SecurityEnvironment_NssImpl::createCertificateFromAsci sal_Int32 SecurityEnvironment_NssImpl :: verifyCertificate( const Reference< csss::XCertificate >& aCert, const Sequence< Reference< csss::XCertificate > >& intermediateCerts ) - throw( css::uno::SecurityException, css::uno::RuntimeException, std::exception ) { sal_Int32 validity = csss::CertificateValidity::INVALID; const X509Certificate_NssImpl* xcert ; @@ -795,7 +793,7 @@ verifyCertificate( const Reference< csss::XCertificate >& aCert, } sal_Int32 SecurityEnvironment_NssImpl::getCertificateCharacters( - const css::uno::Reference< css::security::XCertificate >& aCert ) throw( css::uno::SecurityException, css::uno::RuntimeException, std::exception ) { + const css::uno::Reference< css::security::XCertificate >& aCert ) { sal_Int32 characters ; const X509Certificate_NssImpl* xcert ; const CERTCertificate* cert ; @@ -896,7 +894,7 @@ X509Certificate_NssImpl* NssPrivKeyToXCert( SECKEYPrivateKey* priKey ) /* Native methods */ -xmlSecKeysMngrPtr SecurityEnvironment_NssImpl::createKeysManager() throw( Exception, RuntimeException ) { +xmlSecKeysMngrPtr SecurityEnvironment_NssImpl::createKeysManager() { unsigned int i ; CERTCertDBHandle* handler = nullptr ; @@ -950,7 +948,7 @@ xmlSecKeysMngrPtr SecurityEnvironment_NssImpl::createKeysManager() throw( Except } return pKeysMngr ; } -void SecurityEnvironment_NssImpl::destroyKeysManager(xmlSecKeysMngrPtr pKeysMngr) throw( Exception, RuntimeException ) { +void SecurityEnvironment_NssImpl::destroyKeysManager(xmlSecKeysMngrPtr pKeysMngr) { if( pKeysMngr != nullptr ) { xmlSecKeysMngrDestroy( pKeysMngr ) ; } diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx index 117d599c34e4..5b0e8920abd2 100644 --- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx +++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx @@ -69,23 +69,23 @@ private: //Methods from XSecurityEnvironment //Methods from XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException, std::exception ) override ; + virtual OUString SAL_CALL getImplementationName() override ; virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName - ) throw( css::uno::RuntimeException, std::exception ) override ; + ) override ; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) 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() throw( 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 ) throw( 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 ) ; @@ -94,61 +94,59 @@ private: css::security::XCertificate >& xCert, const css::uno::Sequence< css::uno::Reference< css::security::XCertificate > > & - intermediateCerts) - throw (css::uno::SecurityException, css::uno::RuntimeException, std::exception) override ; + intermediateCerts) override ; - virtual ::sal_Int32 SAL_CALL getCertificateCharacters( const css::uno::Reference< css::security::XCertificate >& xCert ) throw (css::uno::SecurityException, css::uno::RuntimeException, std::exception) override ; + virtual ::sal_Int32 SAL_CALL getCertificateCharacters( const css::uno::Reference< css::security::XCertificate >& xCert ) override ; - virtual OUString SAL_CALL getSecurityEnvironmentInformation( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getSecurityEnvironmentInformation( ) override; //Methods from XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) - throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override; static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId() ; /// @throws css::uno::Exception /// @throws css::uno::RuntimeException - void setCertDb( CERTCertDBHandle* aCertDb ) throw( css::uno::Exception , css::uno::RuntimeException ) ; + void setCertDb( CERTCertDBHandle* aCertDb ) ; /// @throws css::uno::Exception /// @throws css::uno::RuntimeException - void adoptSymKey( PK11SymKey* aSymKey ) throw( css::uno::Exception , css::uno::RuntimeException ) ; + void adoptSymKey( PK11SymKey* aSymKey ) ; /// @throws css::uno::Exception /// @throws css::uno::RuntimeException - PK11SymKey* getSymKey( unsigned int position ) throw( css::uno::Exception , css::uno::RuntimeException ) ; + PK11SymKey* getSymKey( unsigned int position ) ; /// @throws css::uno::Exception /// @throws css::uno::RuntimeException - SECKEYPublicKey* getPubKey( unsigned int position ) throw( css::uno::Exception , css::uno::RuntimeException ) ; + SECKEYPublicKey* getPubKey( unsigned int position ) ; /// @throws css::uno::Exception /// @throws css::uno::RuntimeException - SECKEYPrivateKey* getPriKey( unsigned int position ) throw( css::uno::Exception , css::uno::RuntimeException ) ; + SECKEYPrivateKey* getPriKey( unsigned int position ) ; - virtual css::uno::Sequence< css::uno::Reference< css::security::XCertificate > > SAL_CALL getPersonalCertificates() throw( css::uno::SecurityException , css::uno::RuntimeException, std::exception ) override ; + virtual css::uno::Sequence< css::uno::Reference< css::security::XCertificate > > SAL_CALL getPersonalCertificates() override ; - virtual css::uno::Reference< css::security::XCertificate > SAL_CALL getCertificate( const OUString& issuerName, const css::uno::Sequence< sal_Int8 >& serialNumber ) throw( css::uno::SecurityException , css::uno::RuntimeException, std::exception ) override ; + virtual css::uno::Reference< css::security::XCertificate > SAL_CALL getCertificate( const OUString& issuerName, const css::uno::Sequence< sal_Int8 >& serialNumber ) override ; - virtual css::uno::Sequence< css::uno::Reference< css::security::XCertificate > > SAL_CALL buildCertificatePath( const css::uno::Reference< css::security::XCertificate >& beginCert ) throw( css::uno::SecurityException , css::uno::RuntimeException, std::exception ) override ; + virtual css::uno::Sequence< css::uno::Reference< css::security::XCertificate > > SAL_CALL buildCertificatePath( const css::uno::Reference< css::security::XCertificate >& beginCert ) override ; - virtual css::uno::Reference< css::security::XCertificate > SAL_CALL createCertificateFromRaw( const css::uno::Sequence< sal_Int8 >& rawCertificate ) throw( css::uno::SecurityException , css::uno::RuntimeException, std::exception ) override ; - virtual css::uno::Reference< css::security::XCertificate > SAL_CALL createCertificateFromAscii( const OUString& asciiCertificate ) throw( css::uno::SecurityException , css::uno::RuntimeException, std::exception ) override ; + virtual css::uno::Reference< css::security::XCertificate > SAL_CALL createCertificateFromRaw( const css::uno::Sequence< sal_Int8 >& rawCertificate ) override ; + virtual css::uno::Reference< css::security::XCertificate > SAL_CALL createCertificateFromAscii( const OUString& asciiCertificate ) override ; //Native methods /// @throws css::uno::RuntimeException - xmlSecKeysMngrPtr createKeysManager() throw( css::uno::Exception , css::uno::RuntimeException ) ; + xmlSecKeysMngrPtr createKeysManager() ; /// @throws css::uno::Exception /// @throws css::uno::RuntimeException - static void destroyKeysManager(xmlSecKeysMngrPtr pKeysMngr) throw( css::uno::Exception , css::uno::RuntimeException ) ; + static void destroyKeysManager(xmlSecKeysMngrPtr pKeysMngr) ; private: void updateSlots(); /// @throws css::uno::Exception /// @throws css::uno::RuntimeException - void addCryptoSlot( PK11SlotInfo* aSlot ) throw( css::uno::Exception , css::uno::RuntimeException ) ; + void addCryptoSlot( PK11SlotInfo* aSlot ) ; } ; #endif // INCLUDED_XMLSECURITY_SOURCE_XMLSEC_NSS_SECURITYENVIRONMENT_NSSIMPL_HXX diff --git a/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx index 012106c41c05..a45f34ee9714 100644 --- a/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx @@ -64,7 +64,6 @@ SEInitializer_NssImpl::~SEInitializer_NssImpl() /* XSEInitializer */ uno::Reference< cssxc::XXMLSecurityContext > SAL_CALL SEInitializer_NssImpl::createSecurityContext( const OUString& ) - throw (uno::RuntimeException, std::exception) { CERTCertDBHandle *pCertHandle = nullptr ; @@ -99,7 +98,6 @@ uno::Reference< cssxc::XXMLSecurityContext > SAL_CALL } void SAL_CALL SEInitializer_NssImpl::freeSecurityContext( const uno::Reference< cssxc::XXMLSecurityContext >& ) - throw (uno::RuntimeException, std::exception) { /* * because the security context will free all its content when it @@ -111,13 +109,11 @@ void SAL_CALL SEInitializer_NssImpl::freeSecurityContext( const uno::Reference< } OUString SEInitializer_NssImpl_getImplementationName () - throw (uno::RuntimeException) { return OUString ("com.sun.star.xml.security.bridge.xmlsec.SEInitializer_NssImpl" ); } uno::Sequence< OUString > SAL_CALL SEInitializer_NssImpl_getSupportedServiceNames( ) - throw (uno::RuntimeException) { uno::Sequence < OUString > aRet(2); OUString* pArray = aRet.getArray(); @@ -127,24 +123,20 @@ uno::Sequence< OUString > SAL_CALL SEInitializer_NssImpl_getSupportedServiceName } uno::Reference< uno::XInterface > SAL_CALL SEInitializer_NssImpl_createInstance( const uno::Reference< lang::XMultiServiceFactory > & rxMSF) - throw( uno::Exception ) { return static_cast<cppu::OWeakObject*>(new SEInitializer_NssImpl(comphelper::getComponentContext(rxMSF))); } /* XServiceInfo */ OUString SAL_CALL SEInitializer_NssImpl::getImplementationName( ) - throw (uno::RuntimeException, std::exception) { return SEInitializer_NssImpl_getImplementationName(); } sal_Bool SAL_CALL SEInitializer_NssImpl::supportsService( const OUString& rServiceName ) - throw (uno::RuntimeException, std::exception) { return cppu::supportsService( this, rServiceName ); } uno::Sequence< OUString > SAL_CALL SEInitializer_NssImpl::getSupportedServiceNames( ) - throw (uno::RuntimeException, std::exception) { return SEInitializer_NssImpl_getSupportedServiceNames(); } diff --git a/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.hxx b/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.hxx index 6b051315cb93..29335e780bb4 100644 --- a/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.hxx +++ b/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.hxx @@ -41,36 +41,28 @@ public: /* XSEInitializer */ virtual css::uno::Reference< css::xml::crypto::XXMLSecurityContext > - SAL_CALL createSecurityContext( const OUString& ) - throw (css::uno::RuntimeException, std::exception) override; + SAL_CALL createSecurityContext( const OUString& ) override; virtual void SAL_CALL freeSecurityContext( const css::uno::Reference< - css::xml::crypto::XXMLSecurityContext >& securityContext ) - throw (css::uno::RuntimeException, std::exception) override; + css::xml::crypto::XXMLSecurityContext >& securityContext ) override; /* XServiceInfo */ - virtual OUString SAL_CALL getImplementationName( ) - throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getImplementationName( ) override; - virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) - throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) - throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override; }; /// @throws css::uno::RuntimeException -OUString SEInitializer_NssImpl_getImplementationName() - throw ( css::uno::RuntimeException ); +OUString SEInitializer_NssImpl_getImplementationName(); /// @throws css::uno::RuntimeException -css::uno::Sequence< OUString > SAL_CALL SEInitializer_NssImpl_getSupportedServiceNames( ) - throw ( css::uno::RuntimeException ); +css::uno::Sequence< OUString > SAL_CALL SEInitializer_NssImpl_getSupportedServiceNames( ); /// @throws css::uno::Exception css::uno::Reference< css::uno::XInterface > -SAL_CALL SEInitializer_NssImpl_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory > & rxMSF) - throw ( css::uno::Exception ); +SAL_CALL SEInitializer_NssImpl_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory > & rxMSF); #endif diff --git a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx index be930a222b3e..00582e4cf307 100644 --- a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx @@ -55,7 +55,7 @@ X509Certificate_NssImpl::~X509Certificate_NssImpl() { } //Methods from XCertificate -sal_Int16 SAL_CALL X509Certificate_NssImpl::getVersion() throw ( css::uno::RuntimeException, std::exception) { +sal_Int16 SAL_CALL X509Certificate_NssImpl::getVersion() { if( m_pCert != nullptr ) { if( m_pCert->version.len > 0 ) { return ( char )*( m_pCert->version.data ) ; @@ -66,7 +66,7 @@ sal_Int16 SAL_CALL X509Certificate_NssImpl::getVersion() throw ( css::uno::Runti } } -css::uno::Sequence< sal_Int8 > SAL_CALL X509Certificate_NssImpl::getSerialNumber() throw ( css::uno::RuntimeException, std::exception) { +css::uno::Sequence< sal_Int8 > SAL_CALL X509Certificate_NssImpl::getSerialNumber() { if( m_pCert != nullptr && m_pCert->serialNumber.len > 0 ) { Sequence< sal_Int8 > serial( m_pCert->serialNumber.len ) ; for( unsigned int i = 0 ; i < m_pCert->serialNumber.len ; i ++ ) @@ -78,7 +78,7 @@ css::uno::Sequence< sal_Int8 > SAL_CALL X509Certificate_NssImpl::getSerialNumber } } -OUString SAL_CALL X509Certificate_NssImpl::getIssuerName() throw ( css::uno::RuntimeException, std::exception) { +OUString SAL_CALL X509Certificate_NssImpl::getIssuerName() { if( m_pCert != nullptr ) { return OUString(m_pCert->issuerName , PL_strlen(m_pCert->issuerName) , RTL_TEXTENCODING_UTF8) ; } else { @@ -86,7 +86,7 @@ OUString SAL_CALL X509Certificate_NssImpl::getIssuerName() throw ( css::uno::Run } } -OUString SAL_CALL X509Certificate_NssImpl::getSubjectName() throw ( css::uno::RuntimeException, std::exception) { +OUString SAL_CALL X509Certificate_NssImpl::getSubjectName() { if( m_pCert != nullptr ) { return OUString(m_pCert->subjectName , PL_strlen(m_pCert->subjectName) , RTL_TEXTENCODING_UTF8); } else { @@ -94,7 +94,7 @@ OUString SAL_CALL X509Certificate_NssImpl::getSubjectName() throw ( css::uno::Ru } } -css::util::DateTime SAL_CALL X509Certificate_NssImpl::getNotValidBefore() throw ( css::uno::RuntimeException, std::exception) { +css::util::DateTime SAL_CALL X509Certificate_NssImpl::getNotValidBefore() { if( m_pCert != nullptr ) { SECStatus rv ; PRTime notBefore ; @@ -123,7 +123,7 @@ css::util::DateTime SAL_CALL X509Certificate_NssImpl::getNotValidBefore() throw } } -css::util::DateTime SAL_CALL X509Certificate_NssImpl::getNotValidAfter() throw ( css::uno::RuntimeException, std::exception) { +css::util::DateTime SAL_CALL X509Certificate_NssImpl::getNotValidAfter() { if( m_pCert != nullptr ) { SECStatus rv ; PRTime notAfter ; @@ -152,7 +152,7 @@ css::util::DateTime SAL_CALL X509Certificate_NssImpl::getNotValidAfter() throw ( } } -css::uno::Sequence< sal_Int8 > SAL_CALL X509Certificate_NssImpl::getIssuerUniqueID() throw ( css::uno::RuntimeException, std::exception) { +css::uno::Sequence< sal_Int8 > SAL_CALL X509Certificate_NssImpl::getIssuerUniqueID() { if( m_pCert != nullptr && m_pCert->issuerID.len > 0 ) { Sequence< sal_Int8 > issuerUid( m_pCert->issuerID.len ) ; for( unsigned int i = 0 ; i < m_pCert->issuerID.len ; i ++ ) @@ -164,7 +164,7 @@ css::uno::Sequence< sal_Int8 > SAL_CALL X509Certificate_NssImpl::getIssuerUnique } } -css::uno::Sequence< sal_Int8 > SAL_CALL X509Certificate_NssImpl::getSubjectUniqueID() throw ( css::uno::RuntimeException, std::exception) { +css::uno::Sequence< sal_Int8 > SAL_CALL X509Certificate_NssImpl::getSubjectUniqueID() { if( m_pCert != nullptr && m_pCert->subjectID.len > 0 ) { Sequence< sal_Int8 > subjectUid( m_pCert->subjectID.len ) ; for( unsigned int i = 0 ; i < m_pCert->subjectID.len ; i ++ ) @@ -176,7 +176,7 @@ css::uno::Sequence< sal_Int8 > SAL_CALL X509Certificate_NssImpl::getSubjectUniqu } } -css::uno::Sequence< css::uno::Reference< css::security::XCertificateExtension > > SAL_CALL X509Certificate_NssImpl::getExtensions() throw ( css::uno::RuntimeException, std::exception) { +css::uno::Sequence< css::uno::Reference< css::security::XCertificateExtension > > SAL_CALL X509Certificate_NssImpl::getExtensions() { if( m_pCert != nullptr && m_pCert->extensions != nullptr ) { CERTCertExtension** extns ; int len ; @@ -227,7 +227,7 @@ css::uno::Sequence< css::uno::Reference< css::security::XCertificateExtension > } } -css::uno::Reference< css::security::XCertificateExtension > SAL_CALL X509Certificate_NssImpl::findCertificateExtension( const css::uno::Sequence< sal_Int8 >& oid ) throw (css::uno::RuntimeException, std::exception) { +css::uno::Reference< css::security::XCertificateExtension > SAL_CALL X509Certificate_NssImpl::findCertificateExtension( const css::uno::Sequence< sal_Int8 >& oid ) { if( m_pCert != nullptr && m_pCert->extensions != nullptr ) { CERTCertExtension** extns ; SECItem idItem ; @@ -277,7 +277,7 @@ css::uno::Reference< css::security::XCertificateExtension > SAL_CALL X509Certifi } -css::uno::Sequence< sal_Int8 > SAL_CALL X509Certificate_NssImpl::getEncoded() throw ( css::uno::RuntimeException, std::exception) { +css::uno::Sequence< sal_Int8 > SAL_CALL X509Certificate_NssImpl::getEncoded() { if( m_pCert != nullptr && m_pCert->derCert.len > 0 ) { Sequence< sal_Int8 > rawCert( m_pCert->derCert.len ) ; @@ -310,7 +310,7 @@ const CERTCertificate* X509Certificate_NssImpl::getNssCert() const { } } -void X509Certificate_NssImpl::setRawCert( const Sequence< sal_Int8 >& rawCert ) throw ( css::uno::RuntimeException) { +void X509Certificate_NssImpl::setRawCert( const Sequence< sal_Int8 >& rawCert ) { CERTCertificate* cert ; SECItem certItem ; @@ -330,7 +330,7 @@ void X509Certificate_NssImpl::setRawCert( const Sequence< sal_Int8 >& rawCert ) } /* XUnoTunnel */ -sal_Int64 SAL_CALL X509Certificate_NssImpl::getSomething( const Sequence< sal_Int8 >& aIdentifier ) throw( RuntimeException, std::exception ) { +sal_Int64 SAL_CALL X509Certificate_NssImpl::getSomething( const Sequence< sal_Int8 >& aIdentifier ) { if( aIdentifier.getLength() == 16 && 0 == memcmp( getUnoTunnelId().getConstArray(), aIdentifier.getConstArray(), 16 ) ) { return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_uIntPtr>(this)); } @@ -395,7 +395,6 @@ css::uno::Sequence< sal_Int8 > getThumbprint(CERTCertificate *pCert, SECOidTag i } OUString SAL_CALL X509Certificate_NssImpl::getSubjectPublicKeyAlgorithm() - throw ( css::uno::RuntimeException, std::exception) { if( m_pCert != nullptr ) { @@ -408,7 +407,6 @@ OUString SAL_CALL X509Certificate_NssImpl::getSubjectPublicKeyAlgorithm() } css::uno::Sequence< sal_Int8 > SAL_CALL X509Certificate_NssImpl::getSubjectPublicKeyValue() - throw ( css::uno::RuntimeException, std::exception) { if( m_pCert != nullptr ) { @@ -431,7 +429,6 @@ css::uno::Sequence< sal_Int8 > SAL_CALL X509Certificate_NssImpl::getSubjectPubli } OUString SAL_CALL X509Certificate_NssImpl::getSignatureAlgorithm() - throw ( css::uno::RuntimeException, std::exception) { if( m_pCert != nullptr ) { @@ -444,24 +441,21 @@ OUString SAL_CALL X509Certificate_NssImpl::getSignatureAlgorithm() } css::uno::Sequence< sal_Int8 > SAL_CALL X509Certificate_NssImpl::getSHA1Thumbprint() - throw ( css::uno::RuntimeException, std::exception) { return getThumbprint(m_pCert, SEC_OID_SHA1); } -uno::Sequence<sal_Int8> X509Certificate_NssImpl::getSHA256Thumbprint() throw (uno::RuntimeException, std::exception) +uno::Sequence<sal_Int8> X509Certificate_NssImpl::getSHA256Thumbprint() { return getThumbprint(m_pCert, SEC_OID_SHA256); } css::uno::Sequence< sal_Int8 > SAL_CALL X509Certificate_NssImpl::getMD5Thumbprint() - throw ( css::uno::RuntimeException, std::exception) { return getThumbprint(m_pCert, SEC_OID_MD5); } sal_Int32 SAL_CALL X509Certificate_NssImpl::getCertificateUsage( ) - throw ( css::uno::RuntimeException, std::exception) { SECStatus rv; SECItem tmpitem; diff --git a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.hxx b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.hxx index 8c9e6ab502c8..08e9cf1185e7 100644 --- a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.hxx +++ b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.hxx @@ -44,47 +44,42 @@ class X509Certificate_NssImpl : public ::cppu::WeakImplHelper< virtual ~X509Certificate_NssImpl() override ; //Methods from XCertificate - virtual sal_Int16 SAL_CALL getVersion( ) throw ( css::uno::RuntimeException, std::exception) override ; + virtual sal_Int16 SAL_CALL getVersion( ) override ; - virtual css::uno::Sequence< sal_Int8 > SAL_CALL getSerialNumber( ) throw ( css::uno::RuntimeException, std::exception) override ; + virtual css::uno::Sequence< sal_Int8 > SAL_CALL getSerialNumber( ) override ; - virtual OUString SAL_CALL getIssuerName( ) throw ( css::uno::RuntimeException, std::exception) override ; - virtual OUString SAL_CALL getSubjectName( ) throw ( css::uno::RuntimeException, std::exception) override ; + virtual OUString SAL_CALL getIssuerName( ) override ; + virtual OUString SAL_CALL getSubjectName( ) override ; - virtual css::util::DateTime SAL_CALL getNotValidBefore( ) throw ( css::uno::RuntimeException, std::exception) override ; - virtual css::util::DateTime SAL_CALL getNotValidAfter( ) throw ( css::uno::RuntimeException, std::exception) override ; + virtual css::util::DateTime SAL_CALL getNotValidBefore( ) override ; + virtual css::util::DateTime SAL_CALL getNotValidAfter( ) override ; - virtual css::uno::Sequence< sal_Int8 > SAL_CALL getIssuerUniqueID( ) throw ( css::uno::RuntimeException, std::exception) override ; - virtual css::uno::Sequence< sal_Int8 > SAL_CALL getSubjectUniqueID( ) throw ( css::uno::RuntimeException, std::exception) override ; + virtual css::uno::Sequence< sal_Int8 > SAL_CALL getIssuerUniqueID( ) override ; + virtual css::uno::Sequence< sal_Int8 > SAL_CALL getSubjectUniqueID( ) override ; - virtual css::uno::Sequence< css::uno::Reference< css::security::XCertificateExtension > > SAL_CALL getExtensions( ) throw ( css::uno::RuntimeException, std::exception) override ; + virtual css::uno::Sequence< css::uno::Reference< css::security::XCertificateExtension > > SAL_CALL getExtensions( ) override ; - virtual css::uno::Reference< css::security::XCertificateExtension > SAL_CALL findCertificateExtension( const css::uno::Sequence< sal_Int8 >& oid ) throw (css::uno::RuntimeException, std::exception) override ; + virtual css::uno::Reference< css::security::XCertificateExtension > SAL_CALL findCertificateExtension( const css::uno::Sequence< sal_Int8 >& oid ) override ; - virtual css::uno::Sequence< sal_Int8 > SAL_CALL getEncoded( ) throw ( css::uno::RuntimeException, std::exception) override ; + virtual css::uno::Sequence< sal_Int8 > SAL_CALL getEncoded( ) override ; - virtual OUString SAL_CALL getSubjectPublicKeyAlgorithm() - throw ( css::uno::RuntimeException, std::exception) override ; + virtual OUString SAL_CALL getSubjectPublicKeyAlgorithm() override ; - virtual css::uno::Sequence< sal_Int8 > SAL_CALL getSubjectPublicKeyValue() - throw ( css::uno::RuntimeException, std::exception) override ; + virtual css::uno::Sequence< sal_Int8 > SAL_CALL getSubjectPublicKeyValue() override ; - virtual OUString SAL_CALL getSignatureAlgorithm() - throw ( css::uno::RuntimeException, std::exception) override ; + virtual OUString SAL_CALL getSignatureAlgorithm() override ; - virtual css::uno::Sequence< sal_Int8 > SAL_CALL getSHA1Thumbprint() - throw ( css::uno::RuntimeException, std::exception) override ; + virtual css::uno::Sequence< sal_Int8 > SAL_CALL getSHA1Thumbprint() override ; - virtual css::uno::Sequence< sal_Int8 > SAL_CALL getMD5Thumbprint() - throw ( css::uno::RuntimeException, std::exception) override ; + virtual css::uno::Sequence< sal_Int8 > SAL_CALL getMD5Thumbprint() override ; - virtual sal_Int32 SAL_CALL getCertificateUsage( ) throw ( css::uno::RuntimeException, std::exception) override ; + virtual sal_Int32 SAL_CALL getCertificateUsage( ) override ; //Methods from XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override; /// @see xmlsecurity::Certificate::getSHA256Thumbprint(). - virtual css::uno::Sequence<sal_Int8> getSHA256Thumbprint() throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence<sal_Int8> getSHA256Thumbprint() override; static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId() ; @@ -92,7 +87,7 @@ class X509Certificate_NssImpl : public ::cppu::WeakImplHelper< void setCert( CERTCertificate* cert ) ; const CERTCertificate* getNssCert() const ; /// @throws css::uno::RuntimeException - void setRawCert( const css::uno::Sequence< sal_Int8 >& rawCert ) throw ( css::uno::RuntimeException) ; + void setRawCert( const css::uno::Sequence< sal_Int8 >& rawCert ) ; } ; #endif // INCLUDED_XMLSECURITY_SOURCE_XMLSEC_NSS_X509CERTIFICATE_NSSIMPL_HXX diff --git a/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx index 5f65cc37aaee..ccfb78098bda 100644 --- a/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx @@ -54,9 +54,7 @@ Reference< XXMLEncryptionTemplate > SAL_CALL XMLEncryption_NssImpl::encrypt( const Reference< XXMLEncryptionTemplate >& aTemplate , const Reference< XSecurityEnvironment >& aEnvironment -) throw (css::xml::crypto::XMLEncryptionException, - css::uno::SecurityException, - css::uno::RuntimeException, std::exception) +) { xmlSecKeysMngrPtr pMngr = nullptr ; xmlSecEncCtxPtr pEncCtx = nullptr ; @@ -193,9 +191,7 @@ Reference< XXMLEncryptionTemplate > SAL_CALL XMLEncryption_NssImpl::decrypt( const Reference< XXMLEncryptionTemplate >& aTemplate , const Reference< XXMLSecurityContext >& aSecurityCtx -) throw (css::xml::crypto::XMLEncryptionException , - css::uno::SecurityException, - css::uno::RuntimeException, std::exception) +) { xmlSecKeysMngrPtr pMngr = nullptr ; xmlSecEncCtxPtr pEncCtx = nullptr ; @@ -310,12 +306,12 @@ SAL_CALL XMLEncryption_NssImpl::decrypt( } /* XServiceInfo */ -OUString SAL_CALL XMLEncryption_NssImpl::getImplementationName() throw( RuntimeException, std::exception ) { +OUString SAL_CALL XMLEncryption_NssImpl::getImplementationName() { return impl_getImplementationName() ; } /* XServiceInfo */ -sal_Bool SAL_CALL XMLEncryption_NssImpl::supportsService( const OUString& serviceName) throw( RuntimeException, std::exception ) { +sal_Bool SAL_CALL XMLEncryption_NssImpl::supportsService( const OUString& serviceName) { Sequence< OUString > seqServiceNames = getSupportedServiceNames() ; const OUString* pArray = seqServiceNames.getConstArray() ; for( sal_Int32 i = 0 ; i < seqServiceNames.getLength() ; i ++ ) { @@ -326,7 +322,7 @@ sal_Bool SAL_CALL XMLEncryption_NssImpl::supportsService( const OUString& servic } /* XServiceInfo */ -Sequence< OUString > SAL_CALL XMLEncryption_NssImpl::getSupportedServiceNames() throw( RuntimeException, std::exception ) { +Sequence< OUString > SAL_CALL XMLEncryption_NssImpl::getSupportedServiceNames() { return impl_getSupportedServiceNames() ; } @@ -337,12 +333,12 @@ Sequence< OUString > XMLEncryption_NssImpl::impl_getSupportedServiceNames() { return seqServiceNames ; } -OUString XMLEncryption_NssImpl::impl_getImplementationName() throw( RuntimeException ) { +OUString XMLEncryption_NssImpl::impl_getImplementationName() { return OUString("com.sun.star.xml.security.bridge.xmlsec.XMLEncryption_NssImpl") ; } //Helper for registry -Reference< XInterface > SAL_CALL XMLEncryption_NssImpl::impl_createInstance( const Reference< XMultiServiceFactory >& ) throw( RuntimeException ) { +Reference< XInterface > SAL_CALL XMLEncryption_NssImpl::impl_createInstance( const Reference< XMultiServiceFactory >& ) { return Reference< XInterface >( *new XMLEncryption_NssImpl ) ; } diff --git a/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.hxx b/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.hxx index 37d66f6b1dd1..276a4c5c0350 100644 --- a/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.hxx +++ b/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.hxx @@ -47,35 +47,31 @@ class XMLEncryption_NssImpl : public ::cppu::WeakImplHelper< 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 ) ; - throw (css::xml::crypto::XMLEncryptionException , - css::uno::SecurityException, - css::uno::RuntimeException, std::exception) override; + 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 - ) throw (css::xml::crypto::XMLEncryptionException , - css::uno::SecurityException, - css::uno::RuntimeException, std::exception) override; + ) override; //Methods from XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException, std::exception ) override ; + virtual OUString SAL_CALL getImplementationName() override ; virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName - ) throw( css::uno::RuntimeException, std::exception ) override ; + ) override ; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) 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() throw( 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 ) throw( 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 ) ; } ; diff --git a/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx index 8e51babf6a08..6cf908545fa2 100644 --- a/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx @@ -65,7 +65,6 @@ XMLSecurityContext_NssImpl::~XMLSecurityContext_NssImpl() sal_Int32 SAL_CALL XMLSecurityContext_NssImpl::addSecurityEnvironment( const css::uno::Reference< css::xml::crypto::XSecurityEnvironment >& aSecurityEnvironment) - throw (css::security::SecurityInfrastructureException, css::uno::RuntimeException, std::exception) { if( !aSecurityEnvironment.is() ) { @@ -79,14 +78,12 @@ sal_Int32 SAL_CALL XMLSecurityContext_NssImpl::addSecurityEnvironment( sal_Int32 SAL_CALL XMLSecurityContext_NssImpl::getSecurityEnvironmentNumber( ) - throw (css::uno::RuntimeException, std::exception) { return m_vSecurityEnvironments.size(); } css::uno::Reference< css::xml::crypto::XSecurityEnvironment > SAL_CALL XMLSecurityContext_NssImpl::getSecurityEnvironmentByIndex( sal_Int32 index ) - throw (css::uno::RuntimeException, std::exception) { css::uno::Reference< css::xml::crypto::XSecurityEnvironment > xSecurityEnvironment; @@ -102,7 +99,6 @@ css::uno::Reference< css::xml::crypto::XSecurityEnvironment > SAL_CALL css::uno::Reference< css::xml::crypto::XSecurityEnvironment > SAL_CALL XMLSecurityContext_NssImpl::getSecurityEnvironment( ) - throw (css::uno::RuntimeException, std::exception) { if (m_nDefaultEnvIndex >= 0 && m_nDefaultEnvIndex < ( sal_Int32 )m_vSecurityEnvironments.size()) return getSecurityEnvironmentByIndex(m_nDefaultEnvIndex); @@ -111,24 +107,22 @@ css::uno::Reference< css::xml::crypto::XSecurityEnvironment > SAL_CALL } sal_Int32 SAL_CALL XMLSecurityContext_NssImpl::getDefaultSecurityEnvironmentIndex( ) - throw (css::uno::RuntimeException, std::exception) { return m_nDefaultEnvIndex ; } void SAL_CALL XMLSecurityContext_NssImpl::setDefaultSecurityEnvironmentIndex( sal_Int32 nDefaultEnvIndex ) - throw (css::uno::RuntimeException, std::exception) { m_nDefaultEnvIndex = nDefaultEnvIndex; } /* XServiceInfo */ -OUString SAL_CALL XMLSecurityContext_NssImpl::getImplementationName() throw( RuntimeException, std::exception ) { +OUString SAL_CALL XMLSecurityContext_NssImpl::getImplementationName() { return impl_getImplementationName() ; } /* XServiceInfo */ -sal_Bool SAL_CALL XMLSecurityContext_NssImpl::supportsService( const OUString& serviceName) throw( RuntimeException, std::exception ) { +sal_Bool SAL_CALL XMLSecurityContext_NssImpl::supportsService( const OUString& serviceName) { Sequence< OUString > seqServiceNames = getSupportedServiceNames() ; const OUString* pArray = seqServiceNames.getConstArray() ; for( sal_Int32 i = 0 ; i < seqServiceNames.getLength() ; i ++ ) { @@ -139,7 +133,7 @@ sal_Bool SAL_CALL XMLSecurityContext_NssImpl::supportsService( const OUString& s } /* XServiceInfo */ -Sequence< OUString > SAL_CALL XMLSecurityContext_NssImpl::getSupportedServiceNames() throw( RuntimeException, std::exception ) { +Sequence< OUString > SAL_CALL XMLSecurityContext_NssImpl::getSupportedServiceNames() { return impl_getSupportedServiceNames() ; } @@ -150,12 +144,12 @@ Sequence< OUString > XMLSecurityContext_NssImpl::impl_getSupportedServiceNames() return seqServiceNames ; } -OUString XMLSecurityContext_NssImpl::impl_getImplementationName() throw( RuntimeException ) { +OUString XMLSecurityContext_NssImpl::impl_getImplementationName() { return OUString("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_NssImpl") ; } //Helper for registry -Reference< XInterface > SAL_CALL XMLSecurityContext_NssImpl::impl_createInstance( const Reference< XMultiServiceFactory >& ) throw( RuntimeException ) { +Reference< XInterface > SAL_CALL XMLSecurityContext_NssImpl::impl_createInstance( const Reference< XMultiServiceFactory >& ) { return Reference< XInterface >( *new XMLSecurityContext_NssImpl ) ; } diff --git a/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.hxx b/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.hxx index 52db8b1e9517..3d611424a9f3 100644 --- a/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.hxx +++ b/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.hxx @@ -52,45 +52,40 @@ class XMLSecurityContext_NssImpl : public ::cppu::WeakImplHelper< //Methods from XXMLSecurityContext virtual sal_Int32 SAL_CALL addSecurityEnvironment( const css::uno::Reference< css::xml::crypto::XSecurityEnvironment >& aSecurityEnvironment - ) throw (css::security::SecurityInfrastructureException, css::uno::RuntimeException, std::exception) override; + ) override; - virtual ::sal_Int32 SAL_CALL getSecurityEnvironmentNumber( ) - throw (css::uno::RuntimeException, std::exception) override; + virtual ::sal_Int32 SAL_CALL getSecurityEnvironmentNumber( ) override; virtual css::uno::Reference< css::xml::crypto::XSecurityEnvironment > SAL_CALL - getSecurityEnvironmentByIndex( ::sal_Int32 index ) - throw (css::uno::RuntimeException, std::exception) override; + getSecurityEnvironmentByIndex( ::sal_Int32 index ) override; virtual css::uno::Reference< css::xml::crypto::XSecurityEnvironment > SAL_CALL - getSecurityEnvironment( ) - throw (css::uno::RuntimeException, std::exception) override; + getSecurityEnvironment( ) override; - virtual ::sal_Int32 SAL_CALL getDefaultSecurityEnvironmentIndex( ) - throw (css::uno::RuntimeException, std::exception) override; + virtual ::sal_Int32 SAL_CALL getDefaultSecurityEnvironmentIndex( ) override; - virtual void SAL_CALL setDefaultSecurityEnvironmentIndex( sal_Int32 nDefaultEnvIndex ) - throw (css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL setDefaultSecurityEnvironmentIndex( sal_Int32 nDefaultEnvIndex ) override; //Methods from XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException, std::exception ) override ; + virtual OUString SAL_CALL getImplementationName() override ; virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName - ) throw( css::uno::RuntimeException, std::exception ) override ; + ) override ; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) 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() throw( 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 ) throw( 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 ) ; diff --git a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx index 1a3fe0c95f47..566d3cc77d35 100644 --- a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx @@ -58,9 +58,7 @@ Reference< XXMLSignatureTemplate > SAL_CALL XMLSignature_NssImpl::generate( const Reference< XXMLSignatureTemplate >& aTemplate , const Reference< XSecurityEnvironment >& aEnvironment -) throw( css::xml::crypto::XMLSignatureException, - css::uno::SecurityException, - css::uno::RuntimeException, std::exception ) +) { xmlSecKeysMngrPtr pMngr = nullptr ; xmlSecDSigCtxPtr pDsigCtx = nullptr ; @@ -163,9 +161,7 @@ Reference< XXMLSignatureTemplate > SAL_CALL XMLSignature_NssImpl::validate( const Reference< XXMLSignatureTemplate >& aTemplate , const Reference< XXMLSecurityContext >& aSecurityCtx -) throw( css::uno::RuntimeException, - css::uno::SecurityException, - css::xml::crypto::XMLSignatureException, std::exception ) { +) { xmlSecKeysMngrPtr pMngr = nullptr ; xmlSecDSigCtxPtr pDsigCtx = nullptr ; xmlNodePtr pNode = nullptr ; @@ -284,12 +280,12 @@ SAL_CALL XMLSignature_NssImpl::validate( } /* XServiceInfo */ -OUString SAL_CALL XMLSignature_NssImpl::getImplementationName() throw( RuntimeException, std::exception ) { +OUString SAL_CALL XMLSignature_NssImpl::getImplementationName() { return impl_getImplementationName() ; } /* XServiceInfo */ -sal_Bool SAL_CALL XMLSignature_NssImpl::supportsService( const OUString& serviceName) throw( RuntimeException, std::exception ) { +sal_Bool SAL_CALL XMLSignature_NssImpl::supportsService( const OUString& serviceName) { Sequence< OUString > seqServiceNames = getSupportedServiceNames() ; const OUString* pArray = seqServiceNames.getConstArray() ; for( sal_Int32 i = 0 ; i < seqServiceNames.getLength() ; i ++ ) { @@ -300,7 +296,7 @@ sal_Bool SAL_CALL XMLSignature_NssImpl::supportsService( const OUString& service } /* XServiceInfo */ -Sequence< OUString > SAL_CALL XMLSignature_NssImpl::getSupportedServiceNames() throw( RuntimeException, std::exception ) { +Sequence< OUString > SAL_CALL XMLSignature_NssImpl::getSupportedServiceNames() { return impl_getSupportedServiceNames() ; } @@ -311,12 +307,12 @@ Sequence< OUString > XMLSignature_NssImpl::impl_getSupportedServiceNames() { return seqServiceNames ; } -OUString XMLSignature_NssImpl::impl_getImplementationName() throw( RuntimeException ) { +OUString XMLSignature_NssImpl::impl_getImplementationName() { return OUString("com.sun.star.xml.security.bridge.xmlsec.XMLSignature_NssImpl") ; } //Helper for registry -Reference< XInterface > SAL_CALL XMLSignature_NssImpl::impl_createInstance( const Reference< XMultiServiceFactory >& ) throw( RuntimeException ) { +Reference< XInterface > SAL_CALL XMLSignature_NssImpl::impl_createInstance( const Reference< XMultiServiceFactory >& ) { return Reference< XInterface >( *new XMLSignature_NssImpl ) ; } diff --git a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.hxx b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.hxx index 5e6fe23a1ca0..92f50d9acb26 100644 --- a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.hxx +++ b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.hxx @@ -46,35 +46,31 @@ class XMLSignature_NssImpl : public ::cppu::WeakImplHelper< virtual css::uno::Reference< css::xml::crypto::XXMLSignatureTemplate > SAL_CALL generate( const css::uno::Reference< css::xml::crypto::XXMLSignatureTemplate >& aTemplate , const css::uno::Reference< css::xml::crypto::XSecurityEnvironment >& aEnvironment - ) throw (css::xml::crypto::XMLSignatureException, - css::uno::SecurityException, - css::uno::RuntimeException, std::exception) override ; + ) override ; virtual css::uno::Reference< css::xml::crypto::XXMLSignatureTemplate > SAL_CALL validate( const css::uno::Reference< css::xml::crypto::XXMLSignatureTemplate >& aTemplate , const css::uno::Reference< css::xml::crypto::XXMLSecurityContext >& aContext - ) throw( css::uno::RuntimeException, - css::uno::SecurityException, - css::xml::crypto::XMLSignatureException, std::exception) override; + ) override; //Methods from XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException, std::exception ) override ; + virtual OUString SAL_CALL getImplementationName() override ; virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName - ) throw( css::uno::RuntimeException, std::exception ) override ; + ) override ; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) 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() throw( 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 ) throw( 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 ) ; } ; diff --git a/xmlsecurity/source/xmlsec/saxhelper.cxx b/xmlsecurity/source/xmlsec/saxhelper.cxx index 3a6a499eb94b..6fb61db139f6 100644 --- a/xmlsecurity/source/xmlsec/saxhelper.cxx +++ b/xmlsecurity/source/xmlsec/saxhelper.cxx @@ -214,7 +214,6 @@ void SAXHelper::setCurrentNode(const xmlNodePtr pNode) * XDocumentHandler -- start an xml document */ void SAXHelper::startDocument() - throw( cssxs::SAXException , cssu::RuntimeException ) { if( m_pParserCtxt == nullptr) { @@ -243,7 +242,6 @@ void SAXHelper::startDocument() * XDocumentHandler -- end an xml document */ void SAXHelper::endDocument() - throw( cssxs::SAXException , cssu::RuntimeException ) { m_pSaxHandler->endDocument( m_pParserCtxt ) ; } @@ -254,7 +252,6 @@ void SAXHelper::endDocument() void SAXHelper::startElement( const OUString& aName, const cssu::Sequence< cssxcsax::XMLAttribute >& aAttributes ) - throw( cssxs::SAXException , cssu::RuntimeException ) { const xmlChar* fullName = nullptr ; const xmlChar** attrs = nullptr ; @@ -290,7 +287,6 @@ void SAXHelper::startElement( * XDocumentHandler -- end an xml element */ void SAXHelper::endElement( const OUString& aName ) - throw( cssxs::SAXException , cssu::RuntimeException ) { xmlChar* fullname = nullptr ; @@ -308,7 +304,6 @@ void SAXHelper::endElement( const OUString& aName ) * XDocumentHandler -- an xml element or cdata characters */ void SAXHelper::characters( const OUString& aChars ) - throw( cssxs::SAXException , cssu::RuntimeException ) { const xmlChar* chars = nullptr ; int length = 0 ; @@ -326,7 +321,6 @@ void SAXHelper::characters( const OUString& aChars ) * XDocumentHandler -- ignorable xml white space */ void SAXHelper::ignorableWhitespace( const OUString& aWhitespaces ) - throw( cssxs::SAXException , cssu::RuntimeException ) { const xmlChar* chars = nullptr ; int length = 0 ; @@ -346,7 +340,6 @@ void SAXHelper::ignorableWhitespace( const OUString& aWhitespaces ) void SAXHelper::processingInstruction( const OUString& aTarget, const OUString& aData ) - throw( cssxs::SAXException , cssu::RuntimeException ) { xmlChar* target = nullptr ; xmlChar* data = nullptr ; diff --git a/xmlsecurity/source/xmlsec/serialnumberadapter.cxx b/xmlsecurity/source/xmlsec/serialnumberadapter.cxx index 0917f2717a4d..2377654b086d 100644 --- a/xmlsecurity/source/xmlsec/serialnumberadapter.cxx +++ b/xmlsecurity/source/xmlsec/serialnumberadapter.cxx @@ -49,26 +49,21 @@ public: private: virtual ~Service() override {} - virtual OUString SAL_CALL getImplementationName() - throw (css::uno::RuntimeException, std::exception) override + virtual OUString SAL_CALL getImplementationName() override { return xml_security::serial_number_adapter::implementationName(); } - virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) - throw (css::uno::RuntimeException, std::exception) override + virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override { return cppu::supportsService(this, ServiceName); } - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() - throw (css::uno::RuntimeException, std::exception) override + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override { return xml_security::serial_number_adapter::serviceNames(); } virtual OUString SAL_CALL toString( - css::uno::Sequence< sal_Int8 > const & SerialNumber) - throw (css::uno::RuntimeException, std::exception) override + css::uno::Sequence< sal_Int8 > const & SerialNumber) override { return bigIntegerToNumericString(SerialNumber); } virtual css::uno::Sequence< sal_Int8 > SAL_CALL toSequence( - OUString const & SerialNumber) - throw (css::uno::RuntimeException, std::exception) override + OUString const & SerialNumber) override { return numericStringToBigInteger(SerialNumber); } }; @@ -82,14 +77,12 @@ xml_security::serial_number_adapter::create( } OUString xml_security::serial_number_adapter::implementationName() - throw (css::uno::RuntimeException) { return OUString("com.sun.star.comp.security.SerialNumberAdapter"); } css::uno::Sequence< OUString > xml_security::serial_number_adapter::serviceNames() - throw (css::uno::RuntimeException) { css::uno::Sequence< OUString > s { "com.sun.star.security.SerialNumberAdapter" }; return s; diff --git a/xmlsecurity/source/xmlsec/serialnumberadapter.hxx b/xmlsecurity/source/xmlsec/serialnumberadapter.hxx index 5fb4269b92fe..2eb976afdced 100644 --- a/xmlsecurity/source/xmlsec/serialnumberadapter.hxx +++ b/xmlsecurity/source/xmlsec/serialnumberadapter.hxx @@ -37,11 +37,10 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL create( css::uno::Reference< css::uno::XComponentContext > const &); /// @throws css::uno::RuntimeException -OUString implementationName() throw (css::uno::RuntimeException); +OUString implementationName(); /// @throws css::uno::RuntimeException -css::uno::Sequence< OUString > serviceNames() - throw (css::uno::RuntimeException); +css::uno::Sequence< OUString > serviceNames(); } } diff --git a/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx b/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx index 8945a421a3b6..fafa81d30e42 100644 --- a/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx +++ b/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx @@ -168,7 +168,6 @@ void XMLDocumentWrapper_XmlSecImpl::sendStartElement( const cssu::Reference< cssxs::XDocumentHandler >& xHandler, const cssu::Reference< cssxs::XDocumentHandler >& xHandler2, const xmlNodePtr pNode) - throw (cssxs::SAXException) /****** XMLDocumentWrapper_XmlSecImpl/sendStartElement ************************ * * NAME @@ -257,7 +256,6 @@ void XMLDocumentWrapper_XmlSecImpl::sendEndElement( const cssu::Reference< cssxs::XDocumentHandler >& xHandler, const cssu::Reference< cssxs::XDocumentHandler >& xHandler2, const xmlNodePtr pNode) - throw (cssxs::SAXException) /****** XMLDocumentWrapper_XmlSecImpl/sendEndElement ************************** * * NAME @@ -291,7 +289,6 @@ void XMLDocumentWrapper_XmlSecImpl::sendNode( const cssu::Reference< cssxs::XDocumentHandler >& xHandler, const cssu::Reference< cssxs::XDocumentHandler >& xHandler2, const xmlNodePtr pNode) - throw (cssxs::SAXException) /****** XMLDocumentWrapper_XmlSecImpl/sendNode ******************************** * * NAME @@ -599,21 +596,18 @@ void XMLDocumentWrapper_XmlSecImpl::rebuildIDLink(xmlNodePtr pNode) const /* XXMLDocumentWrapper */ cssu::Reference< cssxw::XXMLElementWrapper > SAL_CALL XMLDocumentWrapper_XmlSecImpl::getCurrentElement( ) - throw (cssu::RuntimeException, std::exception) { XMLElementWrapper_XmlSecImpl* pElement = new XMLElementWrapper_XmlSecImpl(m_pCurrentElement); return cssu::Reference< cssxw::XXMLElementWrapper >(pElement); } void SAL_CALL XMLDocumentWrapper_XmlSecImpl::setCurrentElement( const cssu::Reference< cssxw::XXMLElementWrapper >& element ) - throw (cssu::RuntimeException, std::exception) { m_pCurrentElement = checkElement( element ); saxHelper.setCurrentNode( m_pCurrentElement ); } void SAL_CALL XMLDocumentWrapper_XmlSecImpl::removeCurrentElement( ) - throw (cssu::RuntimeException, std::exception) { OSL_ASSERT( m_pCurrentElement != nullptr ); @@ -635,14 +629,12 @@ void SAL_CALL XMLDocumentWrapper_XmlSecImpl::removeCurrentElement( ) } sal_Bool SAL_CALL XMLDocumentWrapper_XmlSecImpl::isCurrent( const cssu::Reference< cssxw::XXMLElementWrapper >& node ) - throw (cssu::RuntimeException, std::exception) { xmlNodePtr pNode = checkElement(node); return (pNode == m_pCurrentElement); } sal_Bool SAL_CALL XMLDocumentWrapper_XmlSecImpl::isCurrentElementEmpty( ) - throw (cssu::RuntimeException, std::exception) { bool rc = false; @@ -655,7 +647,6 @@ sal_Bool SAL_CALL XMLDocumentWrapper_XmlSecImpl::isCurrentElementEmpty( ) } OUString SAL_CALL XMLDocumentWrapper_XmlSecImpl::getNodeName( const cssu::Reference< cssxw::XXMLElementWrapper >& node ) - throw (cssu::RuntimeException, std::exception) { xmlNodePtr pNode = checkElement(node); return OUString::fromUtf8(reinterpret_cast<char const *>(pNode->name)); @@ -665,7 +656,6 @@ void SAL_CALL XMLDocumentWrapper_XmlSecImpl::clearUselessData( const cssu::Reference< cssxw::XXMLElementWrapper >& node, const cssu::Sequence< cssu::Reference< cssxw::XXMLElementWrapper > >& reservedDescendants, const cssu::Reference< cssxw::XXMLElementWrapper >& stopAtNode ) - throw (cssu::RuntimeException, std::exception) { xmlNodePtr pTargetNode = checkElement(node); @@ -679,7 +669,6 @@ void SAL_CALL XMLDocumentWrapper_XmlSecImpl::clearUselessData( } void SAL_CALL XMLDocumentWrapper_XmlSecImpl::collapse( const cssu::Reference< cssxw::XXMLElementWrapper >& node ) - throw (cssu::RuntimeException, std::exception) { xmlNodePtr pTargetNode = checkElement(node); xmlNodePtr pParent; @@ -698,7 +687,6 @@ void SAL_CALL XMLDocumentWrapper_XmlSecImpl::collapse( const cssu::Reference< cs } void SAL_CALL XMLDocumentWrapper_XmlSecImpl::getTree( const cssu::Reference< cssxs::XDocumentHandler >& handler ) - throw (cssxs::SAXException, cssu::RuntimeException, std::exception) { if (m_pRootElement != nullptr) { @@ -742,7 +730,6 @@ void SAL_CALL XMLDocumentWrapper_XmlSecImpl::generateSAXEvents( const cssu::Reference< cssxs::XDocumentHandler >& xEventKeeperHandler, const cssu::Reference< cssxw::XXMLElementWrapper >& startNode, const cssu::Reference< cssxw::XXMLElementWrapper >& endNode ) - throw (cssxs::SAXException, cssu::RuntimeException, std::exception) { /* * The first SAX event is the startElement of the startNode @@ -816,7 +803,6 @@ void SAL_CALL XMLDocumentWrapper_XmlSecImpl::generateSAXEvents( void SAL_CALL XMLDocumentWrapper_XmlSecImpl::rebuildIDLink( const css::uno::Reference< css::xml::wrapper::XXMLElementWrapper >& node ) - throw (css::uno::RuntimeException, std::exception) { xmlNodePtr pNode = checkElement( node ); rebuildIDLink(pNode); @@ -825,17 +811,14 @@ void SAL_CALL XMLDocumentWrapper_XmlSecImpl::rebuildIDLink( /* cssxs::XDocumentHandler */ void SAL_CALL XMLDocumentWrapper_XmlSecImpl::startDocument( ) - throw (cssxs::SAXException, cssu::RuntimeException, std::exception) { } void SAL_CALL XMLDocumentWrapper_XmlSecImpl::endDocument( ) - throw (cssxs::SAXException, cssu::RuntimeException, std::exception) { } void SAL_CALL XMLDocumentWrapper_XmlSecImpl::startElement( const OUString& aName, const cssu::Reference< cssxs::XAttributeList >& xAttribs ) - throw (cssxs::SAXException, cssu::RuntimeException, std::exception) { sal_Int32 nLength = xAttribs->getLength(); cssu::Sequence< cssxcsax::XMLAttribute > aAttributes (nLength); @@ -850,48 +833,40 @@ void SAL_CALL XMLDocumentWrapper_XmlSecImpl::startElement( const OUString& aName } void SAL_CALL XMLDocumentWrapper_XmlSecImpl::endElement( const OUString& aName ) - throw (cssxs::SAXException, cssu::RuntimeException, std::exception) { saxHelper.endElement(aName); m_pCurrentElement = saxHelper.getCurrentNode(); } void SAL_CALL XMLDocumentWrapper_XmlSecImpl::characters( const OUString& aChars ) - throw (cssxs::SAXException, cssu::RuntimeException, std::exception) { saxHelper.characters(aChars); } void SAL_CALL XMLDocumentWrapper_XmlSecImpl::ignorableWhitespace( const OUString& aWhitespaces ) - throw (cssxs::SAXException, cssu::RuntimeException, std::exception) { saxHelper.ignorableWhitespace(aWhitespaces); } void SAL_CALL XMLDocumentWrapper_XmlSecImpl::processingInstruction( const OUString& aTarget, const OUString& aData ) - throw (cssxs::SAXException, cssu::RuntimeException, std::exception) { saxHelper.processingInstruction(aTarget, aData); } void SAL_CALL XMLDocumentWrapper_XmlSecImpl::setDocumentLocator( const cssu::Reference< cssxs::XLocator >& ) - throw (cssxs::SAXException, cssu::RuntimeException, std::exception) { } /* XCompressedDocumentHandler */ void SAL_CALL XMLDocumentWrapper_XmlSecImpl::compressedStartDocument( ) - throw (cssxs::SAXException, cssu::RuntimeException, std::exception) { } void SAL_CALL XMLDocumentWrapper_XmlSecImpl::compressedEndDocument( ) - throw (cssxs::SAXException, cssu::RuntimeException, std::exception) { } void SAL_CALL XMLDocumentWrapper_XmlSecImpl::compressedStartElement( const OUString& aName, const cssu::Sequence< cssxcsax::XMLAttribute >& aAttributes ) - throw (cssxs::SAXException, cssu::RuntimeException, std::exception) { saxHelper.startElement(aName, aAttributes); m_pCurrentElement = saxHelper.getCurrentNode(); @@ -900,42 +875,35 @@ void SAL_CALL XMLDocumentWrapper_XmlSecImpl::compressedStartElement( const OUStr } void SAL_CALL XMLDocumentWrapper_XmlSecImpl::compressedEndElement( const OUString& aName ) - throw (cssxs::SAXException, cssu::RuntimeException, std::exception) { endElement( aName ); } void SAL_CALL XMLDocumentWrapper_XmlSecImpl::compressedCharacters( const OUString& aChars ) - throw (cssxs::SAXException, cssu::RuntimeException, std::exception) { characters( aChars ); } void SAL_CALL XMLDocumentWrapper_XmlSecImpl::compressedIgnorableWhitespace( const OUString& aWhitespaces ) - throw (cssxs::SAXException, cssu::RuntimeException, std::exception) { ignorableWhitespace( aWhitespaces ); } void SAL_CALL XMLDocumentWrapper_XmlSecImpl::compressedProcessingInstruction( const OUString& aTarget, const OUString& aData ) - throw (cssxs::SAXException, cssu::RuntimeException, std::exception) { processingInstruction( aTarget, aData ); } void SAL_CALL XMLDocumentWrapper_XmlSecImpl::compressedSetDocumentLocator( sal_Int32 /*columnNumber*/, sal_Int32 /*lineNumber*/, const OUString& /*publicId*/, const OUString& /*systemId*/ ) - throw (cssxs::SAXException, cssu::RuntimeException, std::exception) { } OUString XMLDocumentWrapper_XmlSecImpl_getImplementationName () - throw (cssu::RuntimeException) { return OUString ( IMPLEMENTATION_NAME ); } cssu::Sequence< OUString > SAL_CALL XMLDocumentWrapper_XmlSecImpl_getSupportedServiceNames( ) - throw (cssu::RuntimeException) { cssu::Sequence<OUString> aRet { "com.sun.star.xml.wrapper.XMLDocumentWrapper" }; return aRet; @@ -943,24 +911,20 @@ cssu::Sequence< OUString > SAL_CALL XMLDocumentWrapper_XmlSecImpl_getSupportedSe cssu::Reference< cssu::XInterface > SAL_CALL XMLDocumentWrapper_XmlSecImpl_createInstance( const cssu::Reference< cssu::XComponentContext > &) - throw( cssu::Exception ) { return static_cast<cppu::OWeakObject*>(new XMLDocumentWrapper_XmlSecImpl( )); } /* XServiceInfo */ OUString SAL_CALL XMLDocumentWrapper_XmlSecImpl::getImplementationName( ) - throw (cssu::RuntimeException, std::exception) { return XMLDocumentWrapper_XmlSecImpl_getImplementationName(); } sal_Bool SAL_CALL XMLDocumentWrapper_XmlSecImpl::supportsService( const OUString& rServiceName ) - throw (cssu::RuntimeException, std::exception) { return cppu::supportsService( this, rServiceName ); } cssu::Sequence< OUString > SAL_CALL XMLDocumentWrapper_XmlSecImpl::getSupportedServiceNames( ) - throw (cssu::RuntimeException, std::exception) { return XMLDocumentWrapper_XmlSecImpl_getSupportedServiceNames(); } diff --git a/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx b/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx index 409a68d86cc1..6c9efb970083 100644 --- a/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx +++ b/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx @@ -38,7 +38,6 @@ XMLElementWrapper_XmlSecImpl::XMLElementWrapper_XmlSecImpl(const xmlNodePtr pNod /* XUnoTunnel */ cssu::Sequence< sal_Int8 > XMLElementWrapper_XmlSecImpl::getUnoTunnelImplementationId() - throw (cssu::RuntimeException) { static ::cppu::OImplementationId* pId = nullptr; if (! pId) @@ -54,7 +53,6 @@ cssu::Sequence< sal_Int8 > XMLElementWrapper_XmlSecImpl::getUnoTunnelImplementat } sal_Int64 SAL_CALL XMLElementWrapper_XmlSecImpl::getSomething( const cssu::Sequence< sal_Int8 >& aIdentifier ) - throw (cssu::RuntimeException, std::exception) { if (aIdentifier.getLength() == 16 && 0 == memcmp( @@ -72,13 +70,11 @@ sal_Int64 SAL_CALL XMLElementWrapper_XmlSecImpl::getSomething( const cssu::Seque OUString XMLElementWrapper_XmlSecImpl_getImplementationName () - throw (cssu::RuntimeException) { return OUString ( IMPLEMENTATION_NAME ); } cssu::Sequence< OUString > SAL_CALL XMLElementWrapper_XmlSecImpl_getSupportedServiceNames( ) - throw (cssu::RuntimeException) { cssu::Sequence<OUString> aRet { "com.sun.star.xml.wrapper.XMLElementWrapper" }; return aRet; @@ -87,24 +83,20 @@ cssu::Sequence< OUString > SAL_CALL XMLElementWrapper_XmlSecImpl_getSupportedSer cssu::Reference< cssu::XInterface > SAL_CALL XMLElementWrapper_XmlSecImpl_createInstance( const cssu::Reference< cssu::XComponentContext > &) - throw( cssu::Exception ) { return static_cast<cppu::OWeakObject*>(new XMLElementWrapper_XmlSecImpl(nullptr)); } /* XServiceInfo */ OUString SAL_CALL XMLElementWrapper_XmlSecImpl::getImplementationName( ) - throw (cssu::RuntimeException, std::exception) { return XMLElementWrapper_XmlSecImpl_getImplementationName(); } sal_Bool SAL_CALL XMLElementWrapper_XmlSecImpl::supportsService( const OUString& rServiceName ) - throw (cssu::RuntimeException, std::exception) { return cppu::supportsService( this, rServiceName ); } cssu::Sequence< OUString > SAL_CALL XMLElementWrapper_XmlSecImpl::getSupportedServiceNames( ) - throw (cssu::RuntimeException, std::exception) { return XMLElementWrapper_XmlSecImpl_getSupportedServiceNames(); } diff --git a/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.hxx b/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.hxx index 469ab4eef5a5..67a47d17db31 100644 --- a/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.hxx +++ b/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.hxx @@ -59,19 +59,14 @@ public: /* XXMLElementWrapper */ /* css::lang::XUnoTunnel */ - virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) - throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override; /// @throws css::uno::RuntimeException - static css::uno::Sequence < sal_Int8 > getUnoTunnelImplementationId() - throw(css::uno::RuntimeException); + static css::uno::Sequence < sal_Int8 > getUnoTunnelImplementationId(); /* css::lang::XServiceInfo */ - virtual OUString SAL_CALL getImplementationName( ) - throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) - throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) - throw (css::uno::RuntimeException, std::exception) override; + 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; public: /* @@ -89,18 +84,15 @@ public: }; /// @throws css::uno::RuntimeException -OUString XMLElementWrapper_XmlSecImpl_getImplementationName() - throw ( css::uno::RuntimeException ); +OUString XMLElementWrapper_XmlSecImpl_getImplementationName(); /// @throws css::uno::RuntimeException -css::uno::Sequence< OUString > SAL_CALL XMLElementWrapper_XmlSecImpl_getSupportedServiceNames( ) - throw ( css::uno::RuntimeException ); +css::uno::Sequence< OUString > SAL_CALL XMLElementWrapper_XmlSecImpl_getSupportedServiceNames( ); /// @throws css::uno::Exception css::uno::Reference< css::uno::XInterface > SAL_CALL XMLElementWrapper_XmlSecImpl_createInstance( - const css::uno::Reference< css::uno::XComponentContext > &) - throw ( css::uno::Exception ); + const css::uno::Reference< css::uno::XComponentContext > &); #endif |