summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorMichael Mi <mmi@openoffice.org>2004-07-23 02:12:27 +0000
committerMichael Mi <mmi@openoffice.org>2004-07-23 02:12:27 +0000
commitf7a7f2b0e923125dc63cec4c476e2d02537a22f3 (patch)
treea38250b715d59d9f86d86011bed843f578262f1b /xmlsecurity
parent401fc9b2074fae68e9386b86e1a047e72ae29191 (diff)
Issue number:
Submitted by: Andrew Fan Reviewed by:
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/source/xmlsec/makefile.mk5
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx19
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx13
-rw-r--r--xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx25
-rw-r--r--xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx13
5 files changed, 40 insertions, 35 deletions
diff --git a/xmlsecurity/source/xmlsec/makefile.mk b/xmlsecurity/source/xmlsec/makefile.mk
index 0f563a39b288..30ce4ae84a8a 100644
--- a/xmlsecurity/source/xmlsec/makefile.mk
+++ b/xmlsecurity/source/xmlsec/makefile.mk
@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.1.1.1 $
+# $Revision: 1.2 $
#
-# last change: $Author: mt $ $Date: 2004-07-12 13:15:21 $
+# last change: $Author: mmi $ $Date: 2004-07-23 03:12:26 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -82,6 +82,7 @@ CDEFS += -DXMLSEC_CRYPTO_NSS -DXMLSEC_NO_XSLT
# --- Files --------------------------------------------------------
SLOFILES = \
+ $(SLO)$/baseencoding.obj \
$(SLO)$/saxhelper.obj \
$(SLO)$/xmldocumentwrapper_xmlsecimpl.obj \
$(SLO)$/xmlelementwrapper_xmlsecimpl.obj \
diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx
index 9a4f0a0e6cc7..0c3bedbbd942 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlencryption_mscryptimpl.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: mt $ $Date: 2004-07-12 13:15:22 $
+ * last change: $Author: mmi $ $Date: 2004-07-23 03:12:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -104,6 +104,7 @@ using ::com::sun::star::xml::crypto::XSecurityEnvironment ;
using ::com::sun::star::xml::crypto::XXMLEncryption ;
using ::com::sun::star::xml::crypto::XXMLEncryptionTemplate ;
using ::com::sun::star::xml::crypto::XXMLSecurityContext ;
+using ::com::sun::star::xml::crypto::XMLEncryptionException ;
XMLEncryption_MSCryptImpl :: XMLEncryption_MSCryptImpl( const Reference< XMultiServiceFactory >& aFactory ) : m_xServiceManager( aFactory ) {
}
@@ -147,7 +148,7 @@ SAL_CALL XMLEncryption_MSCryptImpl :: encrypt(
//Create Encryption context
pEncCtx = xmlSecEncCtxCreate( pMngr ) ;
if( pEncCtx == NULL )
- throw RuntimeException() ;
+ throw XMLEncryptionException() ;
//Get the encryption template
@@ -181,7 +182,7 @@ SAL_CALL XMLEncryption_MSCryptImpl :: encrypt(
if( pCipherData == NULL ) {
xmlSecEncCtxDestroy( pEncCtx ) ;
- throw RuntimeException() ;
+ throw XMLEncryptionException() ;
}
xmlNodePtr pCipherValue = pCipherData->children;
@@ -192,14 +193,14 @@ SAL_CALL XMLEncryption_MSCryptImpl :: encrypt(
if( pCipherValue == NULL ) {
xmlSecEncCtxDestroy( pEncCtx ) ;
- throw RuntimeException() ;
+ throw XMLEncryptionException() ;
}
pContent = pCipherValue->children;
if( pContent == NULL ) {
xmlSecEncCtxDestroy( pEncCtx ) ;
- throw RuntimeException() ;
+ throw XMLEncryptionException() ;
}
xmlUnlinkNode(pContent);
@@ -223,7 +224,7 @@ SAL_CALL XMLEncryption_MSCryptImpl :: encrypt(
//Encrypt the template
if( xmlSecEncCtxXmlEncrypt( pEncCtx , pEncryptedData , pContent ) < 0 ) {
xmlSecEncCtxDestroy( pEncCtx ) ;
- throw RuntimeException() ;
+ throw XMLEncryptionException() ;
}
xmlSecEncCtxDestroy( pEncCtx ) ;
@@ -275,7 +276,7 @@ XMLEncryption_MSCryptImpl :: decrypt(
//Create Encryption context
pEncCtx = xmlSecEncCtxCreate( pMngr ) ;
if( pEncCtx == NULL )
- throw RuntimeException() ;
+ throw XMLEncryptionException() ;
//Get the encryption template
@@ -317,7 +318,7 @@ XMLEncryption_MSCryptImpl :: decrypt(
//Decrypt the template
if( xmlSecEncCtxDecrypt( pEncCtx , pEncryptedData ) < 0 || pEncCtx->result == NULL ) {
xmlSecEncCtxDestroy( pEncCtx ) ;
- throw RuntimeException() ;
+ throw XMLEncryptionException() ;
}
/*----------------------------------------
if( pEncCtx->resultReplaced != 0 ) {
diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx
index 8e027e1a0022..e63f89fd85c6 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlsignature_mscryptimpl.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: mt $ $Date: 2004-07-12 13:15:22 $
+ * last change: $Author: mmi $ $Date: 2004-07-23 03:12:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -104,6 +104,7 @@ using ::com::sun::star::xml::crypto::XXMLSignature ;
using ::com::sun::star::xml::crypto::XXMLSignatureTemplate ;
using ::com::sun::star::xml::crypto::XXMLSecurityContext ;
using ::com::sun::star::xml::crypto::XUriBinding ;
+using ::com::sun::star::xml::crypto::XMLSignatureException ;
XMLSignature_MSCryptImpl :: XMLSignature_MSCryptImpl( const Reference< XMultiServiceFactory >& aFactory ) : m_xServiceManager( aFactory ) {
}
@@ -170,7 +171,7 @@ SAL_CALL XMLSignature_MSCryptImpl :: generate(
//Create Signature context
pDsigCtx = xmlSecDSigCtxCreate( pMngr ) ;
if( pDsigCtx == NULL )
- throw RuntimeException() ;
+ throw XMLSignatureException() ;
//Sign the template
if( xmlSecDSigCtxSign( pDsigCtx , pNode ) < 0 ) {
@@ -180,7 +181,7 @@ SAL_CALL XMLSignature_MSCryptImpl :: generate(
if( xUriBinding.is() )
xmlUnregisterStreamInputCallbacks() ;
- throw RuntimeException() ;
+ throw XMLSignatureException() ;
}
xmlSecDSigCtxDestroy( pDsigCtx ) ;
@@ -259,7 +260,7 @@ XMLSignature_MSCryptImpl :: validate(
//Create Signature context
pDsigCtx = xmlSecDSigCtxCreate( pMngr ) ;
if( pDsigCtx == NULL )
- throw RuntimeException() ;
+ throw XMLSignatureException() ;
//Verify signature
@@ -270,7 +271,7 @@ XMLSignature_MSCryptImpl :: validate(
if( xUriBinding.is() )
xmlUnregisterStreamInputCallbacks() ;
- throw RuntimeException() ;
+ throw XMLSignatureException() ;
}
valid = ( pDsigCtx->status == xmlSecDSigStatusSucceeded ) ;
diff --git a/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx
index 79d11247ebf5..eb2c83a1131d 100644
--- a/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlencryption_nssimpl.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: mt $ $Date: 2004-07-12 13:15:21 $
+ * last change: $Author: mmi $ $Date: 2004-07-23 03:12:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -104,6 +104,7 @@ using ::com::sun::star::xml::crypto::XSecurityEnvironment ;
using ::com::sun::star::xml::crypto::XXMLEncryption ;
using ::com::sun::star::xml::crypto::XXMLEncryptionTemplate ;
using ::com::sun::star::xml::crypto::XXMLSecurityContext ;
+using ::com::sun::star::xml::crypto::XMLEncryptionException ;
XMLEncryption_NssImpl :: XMLEncryption_NssImpl( const Reference< XMultiServiceFactory >& aFactory ) : m_xServiceManager( aFactory ) {
}
@@ -147,7 +148,7 @@ SAL_CALL XMLEncryption_NssImpl :: encrypt(
//Create Encryption context
pEncCtx = xmlSecEncCtxCreate( pMngr ) ;
if( pEncCtx == NULL )
- throw RuntimeException() ;
+ throw XMLEncryptionException() ;
//Get the encryption template
@@ -182,7 +183,7 @@ SAL_CALL XMLEncryption_NssImpl :: encrypt(
if( pCipherData == NULL ) {
xmlSecEncCtxDestroy( pEncCtx ) ;
- throw RuntimeException() ;
+ throw XMLEncryptionException() ;
}
xmlNodePtr pCipherValue = pCipherData->children;
@@ -193,7 +194,7 @@ SAL_CALL XMLEncryption_NssImpl :: encrypt(
if( pCipherValue == NULL ) {
xmlSecEncCtxDestroy( pEncCtx ) ;
- throw RuntimeException() ;
+ throw XMLEncryptionException() ;
}
pContent = pCipherValue->children;
@@ -203,13 +204,13 @@ SAL_CALL XMLEncryption_NssImpl :: encrypt(
Reference< XXMLElementWrapper > xTarget = aTemplate->getTarget() ;
if( !xTarget.is() ) {
xmlSecEncCtxDestroy( pEncCtx ) ;
- throw RuntimeException() ;
+ throw XMLEncryptionException() ;
}
Reference< XUnoTunnel > xTgtTunnel( xTarget , UNO_QUERY ) ;
if( !xTgtTunnel.is() ) {
xmlSecEncCtxDestroy( pEncCtx ) ;
- throw RuntimeException() ;
+ throw XMLEncryptionException() ;
}
XMLElementWrapper_XmlSecImpl* pTarget = ( XMLElementWrapper_XmlSecImpl* )xTgtTunnel->getSomething( XMLElementWrapper_XmlSecImpl::getUnoTunnelImplementationId() ) ;
@@ -223,7 +224,7 @@ SAL_CALL XMLEncryption_NssImpl :: encrypt(
if( pContent == NULL ) {
xmlSecEncCtxDestroy( pEncCtx ) ;
- throw RuntimeException() ;
+ throw XMLEncryptionException() ;
}
/* MM : remove the following 2 lines
@@ -249,7 +250,7 @@ SAL_CALL XMLEncryption_NssImpl :: encrypt(
//Encrypt the template
if( xmlSecEncCtxXmlEncrypt( pEncCtx , pEncryptedData , pContent ) < 0 ) {
xmlSecEncCtxDestroy( pEncCtx ) ;
- throw RuntimeException() ;
+ throw XMLEncryptionException() ;
}
xmlSecEncCtxDestroy( pEncCtx ) ;
@@ -301,7 +302,7 @@ XMLEncryption_NssImpl :: decrypt(
//Create Encryption context
pEncCtx = xmlSecEncCtxCreate( pMngr ) ;
if( pEncCtx == NULL )
- throw RuntimeException() ;
+ throw XMLEncryptionException() ;
//Get the encryption template
@@ -343,7 +344,7 @@ XMLEncryption_NssImpl :: decrypt(
//Decrypt the template
if( xmlSecEncCtxDecrypt( pEncCtx , pEncryptedData ) < 0 || pEncCtx->result == NULL ) {
xmlSecEncCtxDestroy( pEncCtx ) ;
- throw RuntimeException() ;
+ throw XMLEncryptionException() ;
}
/*----------------------------------------
if( pEncCtx->resultReplaced != 0 ) {
@@ -363,7 +364,7 @@ XMLEncryption_NssImpl :: decrypt(
pNode->setNativeElement( pContent ) ;
} else {
xmlSecEncCtxDestroy( pEncCtx ) ;
- throw RuntimeException() ;
+ throw XMLEncryptionException() ;
}
----------------------------------------*/
diff --git a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
index 1f9ad4115265..d8cbf74b6563 100644
--- a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlsignature_nssimpl.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: mt $ $Date: 2004-07-12 13:15:21 $
+ * last change: $Author: mmi $ $Date: 2004-07-23 03:12:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -104,6 +104,7 @@ using ::com::sun::star::xml::crypto::XXMLSignature ;
using ::com::sun::star::xml::crypto::XXMLSignatureTemplate ;
using ::com::sun::star::xml::crypto::XXMLSecurityContext ;
using ::com::sun::star::xml::crypto::XUriBinding ;
+using ::com::sun::star::xml::crypto::XMLSignatureException ;
XMLSignature_NssImpl :: XMLSignature_NssImpl( const Reference< XMultiServiceFactory >& aFactory ) : m_xServiceManager( aFactory ) {
}
@@ -170,7 +171,7 @@ SAL_CALL XMLSignature_NssImpl :: generate(
//Create Signature context
pDsigCtx = xmlSecDSigCtxCreate( pMngr ) ;
if( pDsigCtx == NULL )
- throw RuntimeException() ;
+ throw XMLSignatureException() ;
//Sign the template
if( xmlSecDSigCtxSign( pDsigCtx , pNode ) < 0 ) {
@@ -180,7 +181,7 @@ SAL_CALL XMLSignature_NssImpl :: generate(
if( xUriBinding.is() )
xmlUnregisterStreamInputCallbacks() ;
- throw RuntimeException() ;
+ throw XMLSignatureException() ;
}
xmlSecDSigCtxDestroy( pDsigCtx ) ;
@@ -259,7 +260,7 @@ XMLSignature_NssImpl :: validate(
//Create Signature context
pDsigCtx = xmlSecDSigCtxCreate( pMngr ) ;
if( pDsigCtx == NULL )
- throw RuntimeException() ;
+ throw XMLSignatureException() ;
//Verify signature
@@ -270,7 +271,7 @@ XMLSignature_NssImpl :: validate(
if( xUriBinding.is() )
xmlUnregisterStreamInputCallbacks() ;
- throw RuntimeException() ;
+ throw XMLSignatureException() ;
}
valid = ( pDsigCtx->status == xmlSecDSigStatusSucceeded ) ;