Kaydet (Commit) 6f20dd18 authored tarafından Samuel Mehrbrodt's avatar Samuel Mehrbrodt

gpg4libre: Remove deprecated dynamic exception specifications

Change-Id: I3bec4570149af50fad5eef33bafb9842ab598798
Reviewed-on: https://gerrit.libreoffice.org/34967Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
üst 9b59b319
......@@ -43,8 +43,7 @@ bool Plugin::ignoreLocation( SourceLocation loc )
const char* bufferName = compiler.getSourceManager().getPresumedLoc( expansionLoc ).getFilename();
if (bufferName == NULL
|| strncmp( bufferName, SRCDIR "/external/", strlen( SRCDIR "/external/" )) == 0
|| strcmp( bufferName, SRCDIR "/sdext/source/pdfimport/wrapper/keyword_list" ) == 0
|| strncmp( bufferName, SRCDIR "/xmlsecurity/source/gpg", strlen( SRCDIR "/xmlsecurity/source/gpg" )) == 0 )
|| strcmp( bufferName, SRCDIR "/sdext/source/pdfimport/wrapper/keyword_list" ) == 0 )
// workdir/CustomTarget/sdext/pdfimport/hash.cxx is generated from
// sdext/source/pdfimport/wrapper/keyword_list by gperf, which
// inserts various #line directives denoting the latter into the
......
......@@ -27,25 +27,21 @@ CertificateImpl::~CertificateImpl()
//Methods from XCertificateImpl
sal_Int16 SAL_CALL CertificateImpl::getVersion()
throw ( RuntimeException, std::exception)
{
return 0;
}
Sequence< sal_Int8 > SAL_CALL CertificateImpl::getSerialNumber()
throw ( RuntimeException, std::exception)
{
return Sequence< sal_Int8 > ();
}
OUString SAL_CALL CertificateImpl::getIssuerName()
throw ( RuntimeException, std::exception)
{
return OStringToOUString(m_pKey.userID(0).name(), RTL_TEXTENCODING_UTF8);
}
OUString SAL_CALL CertificateImpl::getSubjectName()
throw ( RuntimeException, std::exception)
{
return OUString("");
}
......@@ -66,7 +62,6 @@ namespace {
}
DateTime SAL_CALL CertificateImpl::getNotValidBefore()
throw ( RuntimeException, std::exception)
{
const GpgME::Subkey subkey = m_pKey.subkey(0);
if (subkey.isNull())
......@@ -76,7 +71,6 @@ DateTime SAL_CALL CertificateImpl::getNotValidBefore()
}
DateTime SAL_CALL CertificateImpl::getNotValidAfter()
throw ( RuntimeException, std::exception)
{
const GpgME::Subkey subkey = m_pKey.subkey(0);
if (subkey.isNull() || subkey.neverExpires())
......@@ -86,80 +80,67 @@ DateTime SAL_CALL CertificateImpl::getNotValidAfter()
}
Sequence< sal_Int8 > SAL_CALL CertificateImpl::getIssuerUniqueID()
throw ( RuntimeException, std::exception)
{
return Sequence< sal_Int8 > ();
}
Sequence< sal_Int8 > SAL_CALL CertificateImpl::getSubjectUniqueID()
throw ( RuntimeException, std::exception)
{
return Sequence< sal_Int8 > ();
}
Sequence< Reference< XCertificateExtension > > SAL_CALL CertificateImpl::getExtensions()
throw ( RuntimeException, std::exception)
{
return Sequence< Reference< XCertificateExtension > > ();
}
Reference< XCertificateExtension > SAL_CALL CertificateImpl::findCertificateExtension( const Sequence< sal_Int8 >& /*oid*/ )
throw (RuntimeException, std::exception)
{
return Reference< XCertificateExtension > ();
}
Sequence< sal_Int8 > SAL_CALL CertificateImpl::getEncoded()
throw ( RuntimeException, std::exception)
{
return Sequence< sal_Int8 > ();
}
OUString SAL_CALL CertificateImpl::getSubjectPublicKeyAlgorithm()
throw ( RuntimeException, std::exception)
{
return OUString();
}
Sequence< sal_Int8 > SAL_CALL CertificateImpl::getSubjectPublicKeyValue()
throw ( RuntimeException, std::exception)
{
return Sequence< sal_Int8 > ();
}
OUString SAL_CALL CertificateImpl::getSignatureAlgorithm()
throw ( RuntimeException, std::exception)
{
return OUString();
}
Sequence< sal_Int8 > SAL_CALL CertificateImpl::getSHA1Thumbprint()
throw ( RuntimeException, std::exception)
{
return Sequence< sal_Int8 > ();
}
uno::Sequence<sal_Int8> CertificateImpl::getSHA256Thumbprint()
throw (uno::RuntimeException, std::exception)
{
return Sequence< sal_Int8 > ();
}
Sequence< sal_Int8 > SAL_CALL CertificateImpl::getMD5Thumbprint()
throw ( RuntimeException, std::exception)
{
return Sequence< sal_Int8 > ();
}
sal_Int32 SAL_CALL CertificateImpl::getCertificateUsage()
throw ( RuntimeException, std::exception)
{
return 0;
}
/* XUnoTunnel */
sal_Int64 SAL_CALL CertificateImpl::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));
......
......@@ -39,63 +39,44 @@ public:
virtual ~CertificateImpl() 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;
static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId();
/// @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;
// Helper methods
void setCertificate(GpgME::Key key);
......
......@@ -14,17 +14,13 @@ using namespace css::uno;
using namespace css::lang;
Sequence< sal_Int8 > SAL_CALL CipherContext::convertWithCipherContext( const Sequence< sal_Int8 >& /*aData*/ )
throw ( IllegalArgumentException, DisposedException, RuntimeException, std::exception)
{
Sequence<sal_Int8> seq(0);
return seq;
return Sequence<sal_Int8>();
}
uno::Sequence< sal_Int8 > SAL_CALL CipherContext::finalizeCipherContextAndDispose()
throw (DisposedException, RuntimeException, std::exception)
{
Sequence<sal_Int8> seq(0);
return seq;
return Sequence<sal_Int8>();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -22,10 +22,8 @@ private:
public:
// 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
......
......@@ -15,16 +15,13 @@ using namespace css::uno;
using namespace css::lang;
void SAL_CALL DigestContext::updateDigest( const uno::Sequence< ::sal_Int8 >& /*aData*/ )
throw (DisposedException, RuntimeException, std::exception)
void SAL_CALL DigestContext::updateDigest(const Sequence< sal_Int8 >& /*aData*/)
{
}
uno::Sequence< sal_Int8 > SAL_CALL DigestContext::finalizeDigestAndDispose()
throw (DisposedException, RuntimeException, std::exception)
{
Sequence<sal_Int8> seq(0);
return seq;
return Sequence<sal_Int8>();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -20,10 +20,8 @@ class DigestContext : public cppu::WeakImplHelper< css::xml::crypto::XDigestCont
{
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
......
......@@ -33,7 +33,6 @@ SEInitializerGpg::~SEInitializerGpg()
/* XSEInitializer */
Reference< XXMLSecurityContext > SAL_CALL SEInitializerGpg::createSecurityContext( const OUString& )
throw (RuntimeException, std::exception)
{
try
{
......@@ -55,43 +54,36 @@ Reference< XXMLSecurityContext > SAL_CALL SEInitializerGpg::createSecurityContex
}
void SAL_CALL SEInitializerGpg::freeSecurityContext( const uno::Reference< XXMLSecurityContext >& )
throw (uno::RuntimeException, std::exception)
{
}
OUString SEInitializer_getImplementationName()
throw (uno::RuntimeException)
{
return OUString("com.sun.star.xml.security.SEInitializer_Gpg");
}
uno::Sequence< OUString > SAL_CALL SEInitializer_getSupportedServiceNames( )
throw (uno::RuntimeException)
uno::Sequence< OUString > SAL_CALL SEInitializer_getSupportedServiceNames()
{
return {"com.sun.star.xml.crypto.gpg.GpgSEInitializer"};
}
uno::Reference< uno::XInterface > SAL_CALL SEInitializer_createInstance( const uno::Reference< lang::XMultiServiceFactory > & rxMSF)
throw( uno::Exception )
{
return static_cast<cppu::OWeakObject*>(new SEInitializerGpg(comphelper::getComponentContext(rxMSF)));
}
/* XServiceInfo */
OUString SAL_CALL SEInitializerGpg::getImplementationName()
throw (uno::RuntimeException, std::exception)
{
return SEInitializer_getImplementationName();
}
sal_Bool SAL_CALL SEInitializerGpg::supportsService( const OUString& rServiceName )
throw (uno::RuntimeException, std::exception)
{
return cppu::supportsService(this, rServiceName);
}
uno::Sequence< OUString > SAL_CALL SEInitializerGpg::getSupportedServiceNames()
throw (uno::RuntimeException, std::exception)
{
return SEInitializer_getSupportedServiceNames();
}
......
......@@ -32,36 +32,25 @@ 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_getImplementationName()
throw ( css::uno::RuntimeException );
OUString SEInitializer_getImplementationName();
/// @throws css::uno::RuntimeException
css::uno::Sequence< OUString > SAL_CALL SEInitializer_getSupportedServiceNames()
throw ( css::uno::RuntimeException );
css::uno::Sequence< OUString > SAL_CALL SEInitializer_getSupportedServiceNames();
/// @throws css::uno::Exception
css::uno::Reference< css::uno::XInterface > SAL_CALL SEInitializer_createInstance(
const css::uno::Reference< css::lang::XMultiServiceFactory > & rxMSF)
throw ( css::uno::Exception );
const css::uno::Reference< css::lang::XMultiServiceFactory > & rxMSF);
#endif
......
......@@ -34,21 +34,18 @@ SecurityEnvironmentGpg::~SecurityEnvironmentGpg()
/* XServiceInfo */
OUString SAL_CALL SecurityEnvironmentGpg::getImplementationName()
throw( RuntimeException, std::exception )
{
return impl_getImplementationName();
}
/* XServiceInfo */
sal_Bool SAL_CALL SecurityEnvironmentGpg::supportsService( const OUString& serviceName)
throw( RuntimeException, std::exception )
sal_Bool SAL_CALL SecurityEnvironmentGpg::supportsService(const OUString& serviceName)
{
return cppu::supportsService(this, serviceName);
}
/* XServiceInfo */
Sequence< OUString > SAL_CALL SecurityEnvironmentGpg::getSupportedServiceNames()
throw( RuntimeException, std::exception )
{
return impl_getSupportedServiceNames() ;
}
......@@ -60,14 +57,12 @@ Sequence< OUString > SecurityEnvironmentGpg::impl_getSupportedServiceNames()
}
OUString SecurityEnvironmentGpg::impl_getImplementationName()
throw( RuntimeException )
{
return OUString("com.sun.star.xml.security.SecurityEnvironment_Gpg");
}
//Helper for registry
Reference< XInterface > SAL_CALL SecurityEnvironmentGpg::impl_createInstance( const Reference< XMultiServiceFactory >& )
throw( RuntimeException )
{
return Reference< XInterface >( *new SecurityEnvironmentGpg ) ;
}
......@@ -78,7 +73,6 @@ Reference< XSingleServiceFactory > SecurityEnvironmentGpg::impl_createFactory( c
/* XUnoTunnel */
sal_Int64 SAL_CALL SecurityEnvironmentGpg::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));
......@@ -98,13 +92,11 @@ const Sequence< sal_Int8>& SecurityEnvironmentGpg::getUnoTunnelId() {
}
OUString SecurityEnvironmentGpg::getSecurityEnvironmentInformation()
throw( RuntimeException, std::exception )
{
return OUString("");
}
Sequence< Reference < XCertificate > > SecurityEnvironmentGpg::getPersonalCertificates()
throw( SecurityException , RuntimeException, std::exception )
{
GpgME::initializeLibrary();
GpgME::Error err = GpgME::checkEngine(GpgME::OpenPGP);
......@@ -142,39 +134,33 @@ Sequence< Reference < XCertificate > > SecurityEnvironmentGpg::getPersonalCertif
}
Reference< XCertificate > SecurityEnvironmentGpg::getCertificate( const OUString& /*issuerName*/, const Sequence< sal_Int8 >& /*serialNumber*/ )
throw( SecurityException , RuntimeException, std::exception )
{
return nullptr;
}
Sequence< Reference < XCertificate > > SecurityEnvironmentGpg::buildCertificatePath( const Reference< XCertificate >& /*begin*/ )
throw( SecurityException , RuntimeException, std::exception )
{
return Sequence< Reference < XCertificate > >();
}
Reference< XCertificate > SecurityEnvironmentGpg::createCertificateFromRaw( const Sequence< sal_Int8 >& /*rawCertificate*/ )
throw( SecurityException , RuntimeException, std::exception )
{
return nullptr;
}
Reference< XCertificate > SecurityEnvironmentGpg::createCertificateFromAscii( const OUString& /*asciiCertificate*/ )
throw( SecurityException , RuntimeException, std::exception )
{
return nullptr;
}
sal_Int32 SecurityEnvironmentGpg::verifyCertificate( const Reference< XCertificate >& /*aCert*/,
const Sequence< Reference< XCertificate > >& /*intermediateCerts*/ )
throw( SecurityException, RuntimeException, std::exception )
{
return 0;
}
sal_Int32 SecurityEnvironmentGpg::getCertificateCharacters(
const Reference< XCertificate >& /*aCert*/)
throw( SecurityException, RuntimeException, std::exception )
{
// const CertificateImpl* xCert;
// const GpgME::Key* key;
......
......@@ -38,26 +38,19 @@ public:
//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;
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;
//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 ) ;
......@@ -66,37 +59,28 @@ public:
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() ;
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;
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;
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, std::exception ) override;
const OUString& asciiCertificate ) override;
} ;
......
......@@ -25,7 +25,6 @@ XMLEncryptionGpg::~XMLEncryptionGpg() {
/* XXMLEncryption */
Reference< XXMLEncryptionTemplate > SAL_CALL XMLEncryptionGpg::encrypt(const Reference< XXMLEncryptionTemplate >& /*aTemplate*/,
const Reference< XSecurityEnvironment >& /*aEnvironment*/)
throw (XMLEncryptionException, SecurityException, RuntimeException, std::exception)
{
return nullptr;
}
......@@ -33,28 +32,24 @@ Reference< XXMLEncryptionTemplate > SAL_CALL XMLEncryptionGpg::encrypt(const Ref
/* XXMLEncryption */
Reference< XXMLEncryptionTemplate > SAL_CALL XMLEncryptionGpg::decrypt(const Reference< XXMLEncryptionTemplate >& /*aTemplate*/,
const Reference< XXMLSecurityContext >& /*aSecurityCtx*/)
throw (XMLEncryptionException, SecurityException, RuntimeException, std::exception)
{
return nullptr;
}
/* XServiceInfo */
OUString SAL_CALL XMLEncryptionGpg::getImplementationName()
throw( RuntimeException, std::exception )
{
return impl_getImplementationName() ;
}
/* XServiceInfo */
sal_Bool SAL_CALL XMLEncryptionGpg::supportsService( const OUString& serviceName)
throw( RuntimeException, std::exception )
sal_Bool SAL_CALL XMLEncryptionGpg::supportsService(const OUString& serviceName)
{
return cppu::supportsService(this, serviceName);
}
/* XServiceInfo */
Sequence< OUString > SAL_CALL XMLEncryptionGpg::getSupportedServiceNames()
throw( RuntimeException, std::exception )
{
return impl_getSupportedServiceNames() ;
}
......@@ -66,14 +61,12 @@ Sequence< OUString > XMLEncryptionGpg::impl_getSupportedServiceNames()
}
OUString XMLEncryptionGpg::impl_getImplementationName()
throw( RuntimeException )
{
return OUString("com.sun.star.xml.security.XMLEncryption_Gpg");
}
//Helper for registry
Reference< XInterface > SAL_CALL XMLEncryptionGpg::impl_createInstance( const Reference< XMultiServiceFactory >& )
throw( RuntimeException )
{
return Reference< XInterface >(*new XMLEncryptionGpg);
}
......
......@@ -33,43 +33,31 @@ public:
// XXMLEncryption
virtual css::uno::Reference< css::xml::crypto::XXMLEncryptionTemplate > SAL_CALL encrypt(
const css::uno::Reference< css::xml::crypto::XXMLEncryptionTemplate >& aTemplate ,
const css::uno::Reference< css::xml::crypto::XSecurityEnvironment >& aEnvironment)
// ) throw( css::uno::Exception , css::uno::RuntimeException ) ;
throw (css::xml::crypto::XMLEncryptionException ,
css::uno::SecurityException,
css::uno::RuntimeException, std::exception) override;
const css::uno::Reference< css::xml::crypto::XXMLEncryptionTemplate >& aTemplate,
const css::uno::Reference< css::xml::crypto::XSecurityEnvironment >& aEnvironment) 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;
const css::uno::Reference< css::xml::crypto::XXMLEncryptionTemplate >& aTemplate,
const css::uno::Reference< css::xml::crypto::XXMLSecurityContext >& aContext) override;
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() 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;
// Helper for XServiceInfo
static css::uno::Sequence< OUString > impl_getSupportedServiceNames() ;
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 ) ;
const css::uno::Reference< css::lang::XMultiServiceFactory >& aServiceManager);
} ;
#endif // INCLUDED_XMLSECURITY_SOURCE_GPG_XMLENCRYPTION_HXX
......
......@@ -27,7 +27,6 @@ XMLSecurityContextGpg::~XMLSecurityContextGpg()
sal_Int32 SAL_CALL XMLSecurityContextGpg::addSecurityEnvironment(
const Reference< XSecurityEnvironment >& aSecurityEnvironment)
throw (css::security::SecurityInfrastructureException, RuntimeException, std::exception)
{
if(!aSecurityEnvironment.is())
throw RuntimeException("Invalid SecurityEnvironment given!");
......@@ -38,13 +37,11 @@ sal_Int32 SAL_CALL XMLSecurityContextGpg::addSecurityEnvironment(
sal_Int32 SAL_CALL XMLSecurityContextGpg::getSecurityEnvironmentNumber()
throw (RuntimeException, std::exception)
{
return m_vSecurityEnvironments.size();
}
Reference< XSecurityEnvironment > SAL_CALL XMLSecurityContextGpg::getSecurityEnvironmentByIndex(sal_Int32 index)
throw (RuntimeException, std::exception)
{
if (index < 0 || index >= ( sal_Int32 )m_vSecurityEnvironments.size())
throw RuntimeException("Invalid index");
......@@ -53,7 +50,6 @@ Reference< XSecurityEnvironment > SAL_CALL XMLSecurityContextGpg::getSecurityEnv
}
Reference< XSecurityEnvironment > SAL_CALL XMLSecurityContextGpg::getSecurityEnvironment()
throw (RuntimeException, std::exception)
{
if (m_nDefaultEnvIndex < 0 || m_nDefaultEnvIndex >= (sal_Int32) m_vSecurityEnvironments.size())
throw RuntimeException("Invalid index");
......@@ -62,34 +58,29 @@ Reference< XSecurityEnvironment > SAL_CALL XMLSecurityContextGpg::getSecurityEnv
}
sal_Int32 SAL_CALL XMLSecurityContextGpg::getDefaultSecurityEnvironmentIndex()
throw (RuntimeException, std::exception)
{
return m_nDefaultEnvIndex ;
}
void SAL_CALL XMLSecurityContextGpg::setDefaultSecurityEnvironmentIndex(sal_Int32 nDefaultEnvIndex)
throw (RuntimeException, std::exception)
{
m_nDefaultEnvIndex = nDefaultEnvIndex;
}
/* XServiceInfo */
OUString SAL_CALL XMLSecurityContextGpg::getImplementationName()
throw( RuntimeException, std::exception )
{
return impl_getImplementationName() ;
}
/* XServiceInfo */
sal_Bool SAL_CALL XMLSecurityContextGpg::supportsService( const OUString& serviceName)
throw( RuntimeException, std::exception )
{
return cppu::supportsService(this, serviceName);
}
/* XServiceInfo */
Sequence< OUString > SAL_CALL XMLSecurityContextGpg::getSupportedServiceNames()
throw( RuntimeException, std::exception )
{
return impl_getSupportedServiceNames() ;
}
......@@ -101,14 +92,12 @@ Sequence< OUString > XMLSecurityContextGpg::impl_getSupportedServiceNames()
}
OUString XMLSecurityContextGpg::impl_getImplementationName()
throw( RuntimeException )
{
return OUString("com.sun.star.xml.security.XMLSecurityContext_Gpg");
}
//Helper for registry
Reference< XInterface > SAL_CALL XMLSecurityContextGpg::impl_createInstance( const Reference< XMultiServiceFactory >& )
throw( RuntimeException )
{
return Reference< XInterface >( *new XMLSecurityContextGpg ) ;
}
......
......@@ -40,47 +40,36 @@ public:
// 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;
const css::uno::Reference< css::xml::crypto::XSecurityEnvironment >& aSecurityEnvironment) 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;
virtual css::uno::Reference<css::xml::crypto::XSecurityEnvironment > SAL_CALL getSecurityEnvironmentByIndex(sal_Int32 index) override;
virtual css::uno::Reference<css::xml::crypto::XSecurityEnvironment > SAL_CALL getSecurityEnvironment()
throw (css::uno::RuntimeException, std::exception) override;
virtual css::uno::Reference<css::xml::crypto::XSecurityEnvironment > SAL_CALL 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;
// 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;
// XServiceInfo
static css::uno::Sequence< OUString > impl_getSupportedServiceNames() ;
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 ) ;
const css::uno::Reference< css::lang::XMultiServiceFactory >& aServiceManager);
} ;
#endif // INCLUDED_XMLSECURITY_SOURCE_GPG_XMLSECURITYCONTEXT_HXX
......
......@@ -29,7 +29,6 @@ XMLSignatureGpg::~XMLSignatureGpg()
/* XXMLSignature */
Reference< XXMLSignatureTemplate > SAL_CALL XMLSignatureGpg::generate(const Reference< XXMLSignatureTemplate >& /*aTemplate*/,
const Reference< XSecurityEnvironment >& /*aEnvironment*/)
throw( css::xml::crypto::XMLSignatureException, css::uno::SecurityException, css::uno::RuntimeException, std::exception )
{
return nullptr;
}
......@@ -37,27 +36,24 @@ Reference< XXMLSignatureTemplate > SAL_CALL XMLSignatureGpg::generate(const Refe
/* XXMLSignature */
Reference< XXMLSignatureTemplate > SAL_CALL XMLSignatureGpg::validate(const Reference< XXMLSignatureTemplate >& /*aTemplate*/,
const Reference< XXMLSecurityContext >& /*aSecurityCtx*/)
throw(css::uno::RuntimeException, css::uno::SecurityException, css::xml::crypto::XMLSignatureException, std::exception)
{
return nullptr;
}
/* XServiceInfo */
OUString SAL_CALL XMLSignatureGpg::getImplementationName()
throw( RuntimeException, std::exception )
{
return impl_getImplementationName() ;
}
/* XServiceInfo */
sal_Bool SAL_CALL XMLSignatureGpg::supportsService( const OUString& serviceName)
throw( RuntimeException, std::exception )
{
return cppu::supportsService(this, serviceName);
}
/* XServiceInfo */
Sequence< OUString > SAL_CALL XMLSignatureGpg::getSupportedServiceNames() throw( RuntimeException, std::exception )
Sequence< OUString > SAL_CALL XMLSignatureGpg::getSupportedServiceNames()
{
return impl_getSupportedServiceNames() ;
}
......@@ -69,14 +65,12 @@ Sequence< OUString > XMLSignatureGpg::impl_getSupportedServiceNames()
}
OUString XMLSignatureGpg::impl_getImplementationName()
throw( RuntimeException )
{
return OUString("com.sun.star.xml.security.XMLSignature_Gpg");
}
//Helper for registry
Reference< XInterface > SAL_CALL XMLSignatureGpg::impl_createInstance( const Reference< XMultiServiceFactory >& )
throw( RuntimeException )
{
return Reference< XInterface >( *new XMLSignatureGpg ) ;
}
......
......@@ -35,41 +35,31 @@ public:
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;
// 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;
// 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 ) ;
const css::uno::Reference< css::lang::XMultiServiceFactory >& aServiceManager);
} ;
#endif // INCLUDED_XMLSECURITY_SOURCE_XMLSEC_GPG_XMLSIGNATURE_HXX
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment