summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2005-03-29 12:33:06 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2005-03-29 12:33:06 +0000
commit70d0bc82f7d2f96970d85363a8d9a5003c72752b (patch)
tree5640b80f50efd62402ac447d2fba95d4a00bbeaf /xmlsecurity
parent7d1960d2dac143859fedb7610d210f75b800dc3e (diff)
INTEGRATION: CWS xmlsec10 (1.2.38); FILE MERGED
2005/03/29 09:26:40 mmi 1.2.38.1: idl review Issue number: Submitted by: Reviewed by:
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/tools/standalone/mscsfit/encrypter.cxx15
1 files changed, 13 insertions, 2 deletions
diff --git a/xmlsecurity/tools/standalone/mscsfit/encrypter.cxx b/xmlsecurity/tools/standalone/mscsfit/encrypter.cxx
index c4f361a3ca57..2f2aef8d023e 100644
--- a/xmlsecurity/tools/standalone/mscsfit/encrypter.cxx
+++ b/xmlsecurity/tools/standalone/mscsfit/encrypter.cxx
@@ -235,7 +235,7 @@ int SAL_CALL main( int argc, char **argv )
"Encryptor - "
"Cannot get interface of \"XXMLSecurityContext\" from service \"xsec.XMLSecurityContext\"" ) ;
- xSecCtx->setSecurityEnvironment( xSecEnv ) ;
+ xSecCtx->addSecurityEnvironment( xSecEnv ) ;
//Get encrypter
Reference< XInterface > xmlencrypter =
@@ -250,10 +250,21 @@ int SAL_CALL main( int argc, char **argv )
"Cannot get interface of \"XXMLEncryption\" from service \"xsec.XMLEncryption\"" ) ;
//perform encryption
- xTemplate = xEncrypter->encrypt( xTemplate , xSecCtx ) ;
+ xTemplate = xEncrypter->encrypt( xTemplate , xSecEnv ) ;
OSL_ENSURE( xTemplate.is() ,
"Encryptor - "
"Cannot encrypt the xml document" ) ;
+
+
+ com::sun::star::xml::crypto::SecurityOperationStatus m_nStatus = xTemplate->getStatus();
+ if (m_nStatus == SecurityOperationStatus_OPERATION_SUCCEEDED)
+ {
+ fprintf( stdout, "Operation succeeds.\n") ;
+ }
+ else
+ {
+ fprintf( stdout, "Operation fails.\n") ;
+ }
} catch( Exception& e ) {
fprintf( stderr , "Error Message: %s\n" , OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() ) ;
goto done ;