diff options
Diffstat (limited to 'xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx')
-rw-r--r-- | xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx index 9c08a4d01fce..090dee7e2f8a 100644 --- a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -78,7 +78,7 @@ Reference< XXMLSignatureTemplate > SAL_CALL XMLSignature_NssImpl :: generate( const Reference< XXMLSignatureTemplate >& aTemplate , const Reference< XSecurityEnvironment >& aEnvironment -) throw( com::sun::star::xml::crypto::XMLSignatureException, +) throw( com::sun::star::xml::crypto::XMLSignatureException, com::sun::star::uno::SecurityException ) { xmlSecKeysMngrPtr pMngr = NULL ; @@ -157,7 +157,7 @@ SAL_CALL XMLSignature_NssImpl :: generate( } //Sign the template - if( xmlSecDSigCtxSign( pDsigCtx , pNode ) == 0 ) + if( xmlSecDSigCtxSign( pDsigCtx , pNode ) == 0 ) { if (pDsigCtx->status == xmlSecDSigStatusSucceeded) aTemplate->setStatus(com::sun::star::xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED); @@ -186,8 +186,8 @@ Reference< XXMLSignatureTemplate > SAL_CALL XMLSignature_NssImpl :: validate( const Reference< XXMLSignatureTemplate >& aTemplate , const Reference< XXMLSecurityContext >& aSecurityCtx -) throw( com::sun::star::uno::RuntimeException, - com::sun::star::uno::SecurityException, +) throw( com::sun::star::uno::RuntimeException, + com::sun::star::uno::SecurityException, com::sun::star::xml::crypto::XMLSignatureException ) { xmlSecKeysMngrPtr pMngr = NULL ; xmlSecDSigCtxPtr pDsigCtx = NULL ; @@ -228,32 +228,32 @@ SAL_CALL XMLSignature_NssImpl :: validate( } setErrorRecorder(); - + sal_Int32 nSecurityEnvironment = aSecurityCtx->getSecurityEnvironmentNumber(); sal_Int32 i; - + for (i=0; i<nSecurityEnvironment; ++i) { Reference< XSecurityEnvironment > aEnvironment = aSecurityCtx->getSecurityEnvironmentByIndex(i); - + //Get Keys Manager Reference< XUnoTunnel > xSecTunnel( aEnvironment , UNO_QUERY ) ; if( !xSecTunnel.is() ) { throw RuntimeException() ; } - + SecurityEnvironment_NssImpl* pSecEnv = reinterpret_cast<SecurityEnvironment_NssImpl*>( sal::static_int_cast<sal_uIntPtr>( xSecTunnel->getSomething( SecurityEnvironment_NssImpl::getUnoTunnelId() ))); if( pSecEnv == NULL ) throw RuntimeException() ; - + pMngr = pSecEnv->createKeysManager() ; //i39448 if( !pMngr ) { throw RuntimeException() ; } - + //Create Signature context pDsigCtx = xmlSecDSigCtxCreate( pMngr ) ; if( pDsigCtx == NULL ) @@ -266,9 +266,9 @@ SAL_CALL XMLSignature_NssImpl :: validate( //Verify signature int rs = xmlSecDSigCtxVerify( pDsigCtx , pNode ); - - - if (rs == 0 && + + + if (rs == 0 && pDsigCtx->status == xmlSecDSigStatusSucceeded) { aTemplate->setStatus(com::sun::star::xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED); |