diff options
author | Rüdiger Timm <rt@openoffice.org> | 2004-11-26 13:54:08 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2004-11-26 13:54:08 +0000 |
commit | 57849918d5c7f877dcc3ee1f6cbd125f373b3dc7 (patch) | |
tree | ec8afd95129845ee8590f2d5b8d180c830c4d2eb /xmlsecurity/source/framework/decryptorimpl.cxx | |
parent | d268d72e805a119a8b698fafd4acab2694bf9fb9 (diff) |
INTEGRATION: CWS xmlsec06 (1.1.1.1.2); FILE MERGED
2004/10/12 08:30:48 mmi 1.1.1.1.2.1: add error detail information
Issue number:
Submitted by:
Reviewed by:
Diffstat (limited to 'xmlsecurity/source/framework/decryptorimpl.cxx')
-rw-r--r-- | xmlsecurity/source/framework/decryptorimpl.cxx | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/xmlsecurity/source/framework/decryptorimpl.cxx b/xmlsecurity/source/framework/decryptorimpl.cxx index b56354a32e8e..913dd1b894f0 100644 --- a/xmlsecurity/source/framework/decryptorimpl.cxx +++ b/xmlsecurity/source/framework/decryptorimpl.cxx @@ -2,9 +2,9 @@ * * $RCSfile: decryptorimpl.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: mt $ $Date: 2004-07-12 13:15:22 $ + * last change: $Author: rt $ $Date: 2004-11-26 14:53:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -156,10 +156,7 @@ void DecryptorImpl::notifyResultListener() const cssu::Reference< cssxc::sax::XDecryptionResultListener > xDecryptionResultListener ( m_xResultListener , cssu::UNO_QUERY ) ; - xDecryptionResultListener->decrypted( - m_nSecurityId, - m_bOperationSucceed?(cssxc::sax::DecryptionResult_DECRYPTIONSUCCEED): - (cssxc::sax::DecryptionResult_DECRYPTIONFAIL)); + xDecryptionResultListener->decrypted(m_nSecurityId,m_nStatus); } void DecryptorImpl::startEngine( const cssu::Reference< @@ -193,20 +190,22 @@ void DecryptorImpl::startEngine( const cssu::Reference< * Email: michael.mi@sun.com ******************************************************************************/ { - cssu::Reference< cssxw::XXMLElementWrapper > xDecryptedElement; + cssu::Reference< cssxc::XXMLEncryptionTemplate > xResultTemplate; try { - xDecryptedElement = m_xXMLEncryption->decrypt(xEncryptionTemplate, m_xXMLSecurityContext); + xResultTemplate = m_xXMLEncryption->decrypt(xEncryptionTemplate, m_xXMLSecurityContext); + m_nStatus = xResultTemplate->getStatus(); } catch( cssu::Exception& ) { - xDecryptedElement = NULL; + m_nStatus = cssxc::SecurityOperationStatus_RUNTIMEERROR_FAILED; } - if (xDecryptedElement.is()) + if (m_nStatus == cssxc::SecurityOperationStatus_OPERATION_SUCCEEDED) { + cssu::Reference< cssxw::XXMLElementWrapper > xDecryptedElement + = xResultTemplate->getTemplate(); m_xSAXEventKeeper->setElement(m_nIdOfTemplateEC, xDecryptedElement); - m_bOperationSucceed = true; } } |