diff options
Diffstat (limited to 'xmlsecurity')
-rw-r--r-- | xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx index 1dc7b735c94e..311ce6aeb69f 100644 --- a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx @@ -135,7 +135,7 @@ SAL_CALL XMLSignature_NssImpl::generate( if( pSecEnv == nullptr ) throw RuntimeException() ; - setErrorRecorder(); + setErrorRecorder(); std::unique_ptr<xmlSecKeysMngr> pMngr(pSecEnv->createKeysManager()); if( !pMngr ) { @@ -283,25 +283,27 @@ SAL_CALL XMLSignature_NssImpl::validate( } /* XServiceInfo */ -OUString SAL_CALL XMLSignature_NssImpl::getImplementationName() { +OUString SAL_CALL XMLSignature_NssImpl::getImplementationName() +{ return OUString("com.sun.star.xml.crypto.XMLSignature"); } /* XServiceInfo */ -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 ++ ) { - if( *( pArray + i ) == serviceName ) - return true ; +sal_Bool SAL_CALL XMLSignature_NssImpl::supportsService(const OUString& rServiceName) +{ + for (OUString const & rCurrentServiceName : getSupportedServiceNames()) + { + if (rCurrentServiceName == rServiceName) + return true; } - return false ; + return false; } /* XServiceInfo */ -Sequence< OUString > SAL_CALL XMLSignature_NssImpl::getSupportedServiceNames() { +Sequence<OUString> SAL_CALL XMLSignature_NssImpl::getSupportedServiceNames() +{ Sequence<OUString> seqServiceNames { "com.sun.star.xml.crypto.XMLSignature" }; - return seqServiceNames ; + return seqServiceNames; } extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface* |