You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by sc...@apache.org on 2017/09/01 22:51:21 UTC
svn commit: r1807011 - in /santuario/xml-security-cpp/trunk/xsec: dsig/ enc/
enc/OpenSSL/ framework/ samples/ tools/checksig/ tools/cipher/
tools/siginf/ tools/templatesign/ tools/txfmout/ tools/xklient/
tools/xtest/ transformers/ utils/ xenc/impl/
Author: scantor
Date: Fri Sep 1 22:51:20 2017
New Revision: 1807011
URL: http://svn.apache.org/viewvc?rev=1807011&view=rev
Log:
Clean up exception handlers and adjust const-ness.
Modified:
santuario/xml-security-cpp/trunk/xsec/dsig/DSIGKeyInfoX509.cpp
santuario/xml-security-cpp/trunk/xsec/dsig/DSIGReference.cpp
santuario/xml-security-cpp/trunk/xsec/enc/OpenSSL/OpenSSLCryptoProvider.cpp
santuario/xml-security-cpp/trunk/xsec/enc/XSECCryptoException.cpp
santuario/xml-security-cpp/trunk/xsec/enc/XSECCryptoException.hpp
santuario/xml-security-cpp/trunk/xsec/framework/XSECError.hpp
santuario/xml-security-cpp/trunk/xsec/framework/XSECException.cpp
santuario/xml-security-cpp/trunk/xsec/framework/XSECException.hpp
santuario/xml-security-cpp/trunk/xsec/samples/simpleDecrypt.cpp
santuario/xml-security-cpp/trunk/xsec/samples/simpleEncrypt.cpp
santuario/xml-security-cpp/trunk/xsec/samples/simpleHMAC.cpp
santuario/xml-security-cpp/trunk/xsec/samples/simpleValidate.cpp
santuario/xml-security-cpp/trunk/xsec/tools/checksig/checksig.cpp
santuario/xml-security-cpp/trunk/xsec/tools/cipher/cipher.cpp
santuario/xml-security-cpp/trunk/xsec/tools/siginf/siginf.cpp
santuario/xml-security-cpp/trunk/xsec/tools/templatesign/templatesign.cpp
santuario/xml-security-cpp/trunk/xsec/tools/txfmout/txfmout.cpp
santuario/xml-security-cpp/trunk/xsec/tools/xklient/xklient.cpp
santuario/xml-security-cpp/trunk/xsec/tools/xtest/xtest.cpp
santuario/xml-security-cpp/trunk/xsec/transformers/TXFMURL.cpp
santuario/xml-security-cpp/trunk/xsec/transformers/TXFMXPath.cpp
santuario/xml-security-cpp/trunk/xsec/transformers/TXFMXPathFilter.cpp
santuario/xml-security-cpp/trunk/xsec/utils/XSECDOMUtils.cpp
santuario/xml-security-cpp/trunk/xsec/xenc/impl/XENCCipherImpl.cpp
Modified: santuario/xml-security-cpp/trunk/xsec/dsig/DSIGKeyInfoX509.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/dsig/DSIGKeyInfoX509.cpp?rev=1807011&r1=1807010&r2=1807011&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/dsig/DSIGKeyInfoX509.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/dsig/DSIGKeyInfoX509.cpp Fri Sep 1 22:51:20 2017
@@ -165,7 +165,7 @@ void DSIGKeyInfoX509::load(void) {
h->mp_cryptoX509 = cryptoX509;
break;
}
- catch (XSECCryptoException&) {
+ catch (const XSECCryptoException&) {
certElt = findNextChildOfType(certElt, DOMNode::TEXT_NODE);
if (!certElt) {
delete cryptoX509;
Modified: santuario/xml-security-cpp/trunk/xsec/dsig/DSIGReference.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/dsig/DSIGReference.cpp?rev=1807011&r1=1807010&r2=1807011&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/dsig/DSIGReference.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/dsig/DSIGReference.cpp Fri Sep 1 22:51:20 2017
@@ -964,7 +964,7 @@ bool DSIGReference::verifyReferenceList(
}
}
- catch (NetAccessorException e) {
+ catch (const NetAccessorException& e) {
res = false;
@@ -973,7 +973,7 @@ bool DSIGReference::verifyReferenceList(
errStr.sbXMLChCat("\". Reference failed to verify\n");
}
- catch (XSECException e) {
+ catch (const XSECException& e) {
if (e.getType() != XSECException::HTTPURIInputStreamError)
throw;
Modified: santuario/xml-security-cpp/trunk/xsec/enc/OpenSSL/OpenSSLCryptoProvider.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/enc/OpenSSL/OpenSSLCryptoProvider.cpp?rev=1807011&r1=1807010&r2=1807011&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/enc/OpenSSL/OpenSSLCryptoProvider.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/enc/OpenSSL/OpenSSLCryptoProvider.cpp Fri Sep 1 22:51:20 2017
@@ -360,7 +360,7 @@ XSECCryptoKey* OpenSSLCryptoProvider::ke
#endif
}
}
- catch (XSECCryptoException&) {
+ catch (const XSECCryptoException&) {
EVP_PKEY_free(pkey);
throw;
}
Modified: santuario/xml-security-cpp/trunk/xsec/enc/XSECCryptoException.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/enc/XSECCryptoException.cpp?rev=1807011&r1=1807010&r2=1807011&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/enc/XSECCryptoException.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/enc/XSECCryptoException.cpp Fri Sep 1 22:51:20 2017
@@ -101,13 +101,13 @@ XSECCryptoException::~XSECCryptoExceptio
}
-const char * XSECCryptoException::getMsg(void) {
+const char * XSECCryptoException::getMsg(void) const {
return msg;
}
-XSECCryptoException::XSECCryptoExceptionType XSECCryptoException::getType(void) {
+XSECCryptoException::XSECCryptoExceptionType XSECCryptoException::getType(void) const {
return type;
Modified: santuario/xml-security-cpp/trunk/xsec/enc/XSECCryptoException.hpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/enc/XSECCryptoException.hpp?rev=1807011&r1=1807010&r2=1807011&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/enc/XSECCryptoException.hpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/enc/XSECCryptoException.hpp Fri Sep 1 22:51:20 2017
@@ -80,18 +80,18 @@ public:
enum XSECCryptoExceptionType {
- None = 0,
+ None = 0,
GeneralError = 1,
- MDError = 2, // Error in Message Digest
- Base64Error = 3, // Error in a Base64 operation
- MemoryError = 4, // Memory allocation error
- X509Error = 5, // X509 problem
- DSAError = 6, // DSA Error
- RSAError = 7, // RSA Error
+ MDError = 2, // Error in Message Digest
+ Base64Error = 3, // Error in a Base64 operation
+ MemoryError = 4, // Memory allocation error
+ X509Error = 5, // X509 problem
+ DSAError = 6, // DSA Error
+ RSAError = 7, // RSA Error
SymmetricError = 8,
UnsupportedError = 9, // Called function is not supported
- UnsupportedAlgorithm = 10,
- ECError = 11,
+ UnsupportedAlgorithm = 10,
+ ECError = 11,
UnknownError = 12 // Must be last!
};
@@ -149,7 +149,7 @@ public:
* @returns A pointer to the char buffer holding the error string
*/
- const char * getMsg(void);
+ const char * getMsg(void) const;
/**
* \brief Get the error type
@@ -159,7 +159,7 @@ public:
//@}
- XSECCryptoExceptionType getType(void);
+ XSECCryptoExceptionType getType(void) const;
private:
Modified: santuario/xml-security-cpp/trunk/xsec/framework/XSECError.hpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/framework/XSECError.hpp?rev=1807011&r1=1807010&r2=1807011&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/framework/XSECError.hpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/framework/XSECError.hpp Fri Sep 1 22:51:20 2017
@@ -59,11 +59,11 @@ extern const char * XSECExceptionStrings
throw XSECException (XSECException::MemoryAllocationFail); \
}\
} \
- catch (XSECCryptoException &e) \
+ catch (const XSECCryptoException &e) \
{\
throw XSECException (XSECException::InternalError, e.getMsg()); \
} \
- catch (std::bad_alloc&) { \
+ catch (const std::bad_alloc&) { \
throw XSECException (XSECException::MemoryAllocationFail); \
}
@@ -75,11 +75,11 @@ extern const char * XSECExceptionStrings
throw XSECException (XSECException::MemoryAllocationFail); \
} \
} \
- catch (XSECCryptoException &e) \
+ catch (const XSECCryptoException &e) \
{\
throw XSECException (XSECException::InternalError, e.getMsg()); \
} \
- catch (std::bad_alloc&) { \
+ catch (const std::bad_alloc&) { \
throw XSECException (XSECException::MemoryAllocationFail); \
}
Modified: santuario/xml-security-cpp/trunk/xsec/framework/XSECException.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/framework/XSECException.cpp?rev=1807011&r1=1807010&r2=1807011&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/framework/XSECException.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/framework/XSECException.cpp Fri Sep 1 22:51:20 2017
@@ -84,13 +84,13 @@ XSECException::~XSECException() {
}
-const XMLCh * XSECException::getMsg(void) {
+const XMLCh * XSECException::getMsg(void) const {
return msg;
}
-XSECException::XSECExceptionType XSECException::getType(void) {
+XSECException::XSECExceptionType XSECException::getType(void) const {
return type;
Modified: santuario/xml-security-cpp/trunk/xsec/framework/XSECException.hpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/framework/XSECException.hpp?rev=1807011&r1=1807010&r2=1807011&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/framework/XSECException.hpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/framework/XSECException.hpp Fri Sep 1 22:51:20 2017
@@ -61,68 +61,68 @@ public:
enum XSECExceptionType {
- None = 0,
+ None = 0,
MemoryAllocationFail = 1,
NoHashFoundInDigestValue = 2,
UnknownDSIGAttribute = 3,
ExpectedDSIGChildNotFound = 4,
- UnknownTransform = 5,
+ UnknownTransform = 5,
TransformInputOutputFail = 6,
- IDNotFoundInDOMDoc = 7,
+ IDNotFoundInDOMDoc = 7,
UnsupportedXpointerExpr = 8,
- XPathError = 9,
- XSLError = 10,
- Unsupported = 11,
- LoadEmptySignature = 12,
- LoadNonSignature = 13,
+ XPathError = 9,
+ XSLError = 10,
+ Unsupported = 11,
+ LoadEmptySignature = 12,
+ LoadNonSignature = 13,
UnknownCanonicalization = 14,
UnknownSignatureAlgorithm = 15,
- LoadEmptyX509 = 16,
- LoadNonX509 = 17,
- OpenSSLError = 18,
- SigVfyError = 19,
- LoadEmptySignedInfo = 20,
- LoadNonSignedInfo = 21,
+ LoadEmptyX509 = 16,
+ LoadNonX509 = 17,
+ OpenSSLError = 18,
+ SigVfyError = 19,
+ LoadEmptySignedInfo = 20,
+ LoadNonSignedInfo = 21,
ExpectedReferenceURI = 22,
- NotLoaded = 23,
- CryptoProviderError = 24,
- KeyInfoError = 25,
- SigningError = 26,
- LoadEmptyInfoName = 27,
- LoadNonInfoName = 28,
- UnknownKeyValue = 29,
+ NotLoaded = 23,
+ CryptoProviderError = 24,
+ KeyInfoError = 25,
+ SigningError = 26,
+ LoadEmptyInfoName = 27,
+ LoadNonInfoName = 28,
+ UnknownKeyValue = 29,
SignatureCreationError = 30,
- ErrorOpeningURI = 31,
- ProviderError = 32,
- InternalError = 33,
- EnvelopeError = 34,
- UnsupportedFunction = 35,
- TransformError = 36,
- SafeBufferError = 37,
- HTTPURIInputStreamError = 38,
+ ErrorOpeningURI = 31,
+ ProviderError = 32,
+ InternalError = 33,
+ EnvelopeError = 34,
+ UnsupportedFunction = 35,
+ TransformError = 36,
+ SafeBufferError = 37,
+ HTTPURIInputStreamError = 38,
LoadEmptyXPathFilter = 39,
- XPathFilterError = 40,
- DNameDecodeError = 41,
+ XPathFilterError = 40,
+ DNameDecodeError = 41,
// Encryption errors
- EncryptedTypeError = 42,
+ EncryptedTypeError = 42,
ExpectedXENCChildNotFound = 43,
- CipherDataError = 44,
- CipherValueError = 45,
- CipherError = 46,
+ CipherDataError = 44,
+ CipherValueError = 45,
+ CipherError = 46,
AlgorithmMapperError = 47,
EncryptionMethodError = 48,
CipherReferenceError = 49,
- ObjectError = 50,
+ ObjectError = 50,
// XKMS Error
- XKMSError = 51,
+ XKMSError = 51,
ExpectedXKMSChildNotFound = 52,
MessageAbstractTypeError = 53,
RequestAbstractTypeError = 54,
- ResultTypeError = 55,
- StatusError = 56,
- UnknownError = 58 // Must be last!
+ ResultTypeError = 55,
+ StatusError = 56,
+ UnknownError = 58 // Must be last!
};
@@ -179,7 +179,7 @@ public:
* @returns A pointer to the buffer within the exception that holds the
* error message */
- const XMLCh * getMsg(void);
+ const XMLCh * getMsg(void) const;
/**
* \brief Get error type
@@ -190,11 +190,11 @@ public:
* @returns The excetpion type
*/
- XSECExceptionType getType(void);
+ XSECExceptionType getType(void) const;
private:
- XMLCh * msg; // Message to the caller
+ XMLCh * msg; // Message to the caller
XSECExceptionType type; // Type of exception
/* Unimplemented Constructor */
Modified: santuario/xml-security-cpp/trunk/xsec/samples/simpleDecrypt.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/samples/simpleDecrypt.cpp?rev=1807011&r1=1807010&r2=1807011&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/samples/simpleDecrypt.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/samples/simpleDecrypt.cpp Fri Sep 1 22:51:20 2017
@@ -169,7 +169,7 @@ int main (int argc, char **argv) {
}
- catch (XSECException &e)
+ catch (const XSECException &e)
{
char * msg = XMLString::transcode(e.getMsg());
cerr << "An error occurred during an encryption operation\n Message: "
Modified: santuario/xml-security-cpp/trunk/xsec/samples/simpleEncrypt.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/samples/simpleEncrypt.cpp?rev=1807011&r1=1807010&r2=1807011&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/samples/simpleEncrypt.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/samples/simpleEncrypt.cpp Fri Sep 1 22:51:20 2017
@@ -206,7 +206,7 @@ int main (int argc, char **argv) {
}
- catch (XSECException &e)
+ catch (const XSECException &e)
{
char * msg = XMLString::transcode(e.getMsg());
cerr << "An error occurred during an encryption operation\n Message: "
Modified: santuario/xml-security-cpp/trunk/xsec/samples/simpleHMAC.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/samples/simpleHMAC.cpp?rev=1807011&r1=1807010&r2=1807011&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/samples/simpleHMAC.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/samples/simpleHMAC.cpp Fri Sep 1 22:51:20 2017
@@ -154,7 +154,7 @@ int main (int argc, char **argv) {
sig->sign();
}
- catch (XSECException &e)
+ catch (const XSECException &e)
{
cerr << "An error occured during a signature load\n Message: "
<< e.getMsg() << endl;
Modified: santuario/xml-security-cpp/trunk/xsec/samples/simpleValidate.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/samples/simpleValidate.cpp?rev=1807011&r1=1807010&r2=1807011&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/samples/simpleValidate.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/samples/simpleValidate.cpp Fri Sep 1 22:51:20 2017
@@ -239,14 +239,14 @@ int main (int argc, char **argv) {
}
- catch (XSECException &e)
+ catch (const XSECException &e)
{
cerr << "An error occured during a signature load\n Message: "
<< e.getMsg() << endl;
exit(1);
}
- catch (XSECCryptoException &e) {
+ catch (const XSECCryptoException &e) {
cerr << "An error occured in the XML-Security-C Crypto routines\n Message: "
<< e.getMsg() << endl;
exit(1);
Modified: santuario/xml-security-cpp/trunk/xsec/tools/checksig/checksig.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/tools/checksig/checksig.cpp?rev=1807011&r1=1807010&r2=1807011&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/tools/checksig/checksig.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/tools/checksig/checksig.cpp Fri Sep 1 22:51:20 2017
@@ -528,7 +528,7 @@ int evaluate(int argc, char ** argv) {
result = sig->verify();
}
- catch (XSECException &e) {
+ catch (const XSECException &e) {
char * msg = XMLString::transcode(e.getMsg());
cerr << "An error occured during signature verification\n Message: "
<< msg << endl;
@@ -536,7 +536,7 @@ int evaluate(int argc, char ** argv) {
errorsOccured = true;
return 2;
}
- catch (XSECCryptoException &e) {
+ catch (const XSECCryptoException &e) {
cerr << "An error occured during signature verification\n Message: "
<< e.getMsg() << endl;
errorsOccured = true;
Modified: santuario/xml-security-cpp/trunk/xsec/tools/cipher/cipher.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/tools/cipher/cipher.cpp?rev=1807011&r1=1807010&r2=1807011&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/tools/cipher/cipher.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/tools/cipher/cipher.cpp Fri Sep 1 22:51:20 2017
@@ -783,7 +783,7 @@ int evaluate(int argc, char ** argv) {
}
}
- catch (XSECException &e) {
+ catch (const XSECException &e) {
char * msg = XMLString::transcode(e.getMsg());
cerr << "An error occured during encryption/decryption operation\n Message: "
<< msg << endl;
@@ -794,7 +794,7 @@ int evaluate(int argc, char ** argv) {
doc->release();
return 2;
}
- catch (XSECCryptoException &e) {
+ catch (const XSECCryptoException &e) {
cerr << "An error occured during encryption/decryption operation\n Message: "
<< e.getMsg() << endl;
errorsOccured = true;
Modified: santuario/xml-security-cpp/trunk/xsec/tools/siginf/siginf.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/tools/siginf/siginf.cpp?rev=1807011&r1=1807010&r2=1807011&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/tools/siginf/siginf.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/tools/siginf/siginf.cpp Fri Sep 1 22:51:20 2017
@@ -495,7 +495,7 @@ int evaluate(int argc, char ** argv) {
// result = sig->verify();
}
- catch (XSECException &e) {
+ catch (const XSECException &e) {
char * msg = XMLString::transcode(e.getMsg());
cerr << "An error occured during signature loading\n Message: "
<< msg << endl;
Modified: santuario/xml-security-cpp/trunk/xsec/tools/templatesign/templatesign.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/tools/templatesign/templatesign.cpp?rev=1807011&r1=1807010&r2=1807011&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/tools/templatesign/templatesign.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/tools/templatesign/templatesign.cpp Fri Sep 1 22:51:20 2017
@@ -1281,7 +1281,7 @@ int main(int argc, char **argv) {
} /* certCount > 0 */
}
- catch (XSECException &e) {
+ catch (const XSECException &e) {
char * m = XMLString::transcode(e.getMsg());
cerr << "An error occured during signing operation\n Message: "
<< m << endl;
@@ -1290,14 +1290,14 @@ int main(int argc, char **argv) {
exit (1);
}
- catch (XSECCryptoException &e) {
+ catch (const XSECCryptoException &e) {
cerr << "A cryptographic error occured during signature operation\n Message: "
<< e.getMsg() << endl;
errorsOccured = true;
exit(1);
}
- catch (NetAccessorException) {
+ catch (const NetAccessorException&) {
cerr << "A network error occurred during signing operation\n" << endl;
errorsOccured = true;
exit(1);
Modified: santuario/xml-security-cpp/trunk/xsec/tools/txfmout/txfmout.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/tools/txfmout/txfmout.cpp?rev=1807011&r1=1807010&r2=1807011&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/tools/txfmout/txfmout.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/tools/txfmout/txfmout.cpp Fri Sep 1 22:51:20 2017
@@ -306,7 +306,7 @@ void outputReferenceList (DSIGReferenceL
try {
is = ref->makeBinInputStream();
}
- catch (NetAccessorException& e) {
+ catch (const NetAccessorException& e) {
cerr << "Network error in reference " << theOutputter.getIndex() << endl;
is = 0;
@@ -567,7 +567,7 @@ int main(int argc, char **argv) {
}
}
- catch (XSECException &e) {
+ catch (const XSECException &e) {
char * m = XMLString::transcode(e.getMsg());
cerr << "An error occured during signature processing\n Message: "
<< m << endl;
Modified: santuario/xml-security-cpp/trunk/xsec/tools/xklient/xklient.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/tools/xklient/xklient.cpp?rev=1807011&r1=1807010&r2=1807011&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/tools/xklient/xklient.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/tools/xklient/xklient.cpp Fri Sep 1 22:51:20 2017
@@ -3766,7 +3766,7 @@ int doMsgDump(XKMSMessageAbstractType *
}
- catch (XSECException &e) {
+ catch (const XSECException &e) {
cout << "Bad!. Caught exception : " << endl;
char * msg = XMLString::transcode(e.getMsg());
cout << msg << endl;
@@ -3909,7 +3909,7 @@ int doParsedMsgDump(DOMDocument * doc) {
}
- catch (XSECException &e) {
+ catch (const XSECException &e) {
char * msg = XMLString::transcode(e.getMsg());
cerr << "An error occured during message loading\n Message: "
<< msg << endl;
@@ -3917,7 +3917,7 @@ int doParsedMsgDump(DOMDocument * doc) {
errorsOccured = true;
return 2;
}
- catch (XSECCryptoException &e) {
+ catch (const XSECCryptoException &e) {
cerr << "An error occured during encryption/signature processing\n Message: "
<< e.getMsg() << endl;
errorsOccured = true;
@@ -4349,7 +4349,7 @@ int doRequest(int argc, char ** argv, in
}
}
- catch (XSECException &e) {
+ catch (const XSECException &e) {
char * m = XMLString::transcode(e.getMsg());
cerr << "Error sending request: " << m << endl;
Modified: santuario/xml-security-cpp/trunk/xsec/tools/xtest/xtest.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/tools/xtest/xtest.cpp?rev=1807011&r1=1807010&r2=1807011&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/tools/xtest/xtest.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/tools/xtest/xtest.cpp Fri Sep 1 22:51:20 2017
@@ -526,7 +526,7 @@ bool reValidateSig(DOMImplementation *im
}
- catch (XSECException &e)
+ catch (const XSECException &e)
{
cerr << "An error occured during signature processing\n Message: ";
char * ce = XMLString::transcode(e.getMsg());
@@ -535,7 +535,7 @@ bool reValidateSig(DOMImplementation *im
exit(1);
}
- catch (XSECCryptoException &e)
+ catch (const XSECCryptoException &e)
{
cerr << "A cryptographic error occured during signature processing\n Message: "
<< e.getMsg() << endl;
@@ -638,7 +638,7 @@ void unitTestEnvelopingSignature(DOMImpl
}
- catch (XSECException &e)
+ catch (const XSECException &e)
{
cerr << "An error occured during signature processing\n Message: ";
char * ce = XMLString::transcode(e.getMsg());
@@ -647,7 +647,7 @@ void unitTestEnvelopingSignature(DOMImpl
exit(1);
}
- catch (XSECCryptoException &e)
+ catch (const XSECCryptoException &e)
{
cerr << "A cryptographic error occured during signature processing\n Message: "
<< e.getMsg() << endl;
@@ -749,7 +749,7 @@ void unitTestBase64NodeSignature(DOMImpl
}
- catch (XSECException &e)
+ catch (const XSECException &e)
{
cerr << "An error occured during signature processing\n Message: ";
char * ce = XMLString::transcode(e.getMsg());
@@ -758,7 +758,7 @@ void unitTestBase64NodeSignature(DOMImpl
exit(1);
}
- catch (XSECCryptoException &e)
+ catch (const XSECCryptoException &e)
{
cerr << "A cryptographic error occured during signature processing\n Message: "
<< e.getMsg() << endl;
@@ -919,7 +919,7 @@ void unitTestLongSHA(DOMImplementation *
}
- catch (XSECException &e)
+ catch (const XSECException &e)
{
cerr << "An error occured during signature processing\n Message: ";
char * ce = XMLString::transcode(e.getMsg());
@@ -928,7 +928,7 @@ void unitTestLongSHA(DOMImplementation *
exit(1);
}
- catch (XSECCryptoException &e)
+ catch (const XSECCryptoException &e)
{
cerr << "A cryptographic error occured during signature processing\n Message: "
<< e.getMsg() << endl;
@@ -1035,7 +1035,7 @@ void unitTestRSASig(DOMImplementation *
}
- catch (XSECException &e)
+ catch (const XSECException &e)
{
cerr << "An error occured during signature processing\n Message: ";
char * ce = XMLString::transcode(e.getMsg());
@@ -1044,7 +1044,7 @@ void unitTestRSASig(DOMImplementation *
exit(1);
}
- catch (XSECCryptoException &e)
+ catch (const XSECCryptoException &e)
{
cerr << "A cryptographic error occured during signature processing\n Message: "
<< e.getMsg() << endl;
@@ -1528,7 +1528,7 @@ count(ancestor-or-self::dsig:Signature)"
}
}
- catch (XSECException &e)
+ catch (const XSECException &e)
{
cerr << "An error occured during signature processing\n Message: ";
char * ce = XMLString::transcode(e.getMsg());
@@ -1537,7 +1537,7 @@ count(ancestor-or-self::dsig:Signature)"
exit(1);
}
- catch (XSECCryptoException &e)
+ catch (const XSECCryptoException &e)
{
cerr << "A cryptographic error occured during signature processing\n Message: "
<< e.getMsg() << endl;
@@ -1631,7 +1631,7 @@ void unitTestCipherReference(DOMImplemen
}
- catch (XSECException &e)
+ catch (const XSECException &e)
{
cerr << "failed\n";
cerr << "An error occured during signature processing\n Message: ";
@@ -1641,7 +1641,7 @@ void unitTestCipherReference(DOMImplemen
exit(1);
}
- catch (XSECCryptoException &e)
+ catch (const XSECCryptoException &e)
{
cerr << "failed\n";
cerr << "A cryptographic error occured during signature processing\n Message: "
@@ -1742,7 +1742,7 @@ void unitTestElementContentEncrypt(DOMIm
outputDoc(impl, doc);
}
- catch (XSECException &e)
+ catch (const XSECException &e)
{
cerr << "An error occured during encryption processing\n Message: ";
char * ce = XMLString::transcode(e.getMsg());
@@ -1751,7 +1751,7 @@ void unitTestElementContentEncrypt(DOMIm
exit(1);
}
- catch (XSECCryptoException &e)
+ catch (const XSECCryptoException &e)
{
cerr << "A cryptographic error occured during encryption processing\n Message: "
<< e.getMsg() << endl;
@@ -1851,7 +1851,7 @@ void unitTestSmallElement(DOMImplementat
outputDoc(impl, doc);
}
- catch (XSECException &e)
+ catch (const XSECException &e)
{
cerr << "An error occured during encryption processing\n Message: ";
char * ce = XMLString::transcode(e.getMsg());
@@ -1860,7 +1860,7 @@ void unitTestSmallElement(DOMImplementat
exit(1);
}
- catch (XSECCryptoException &e)
+ catch (const XSECCryptoException &e)
{
cerr << "A cryptographic error occured during encryption processing\n Message: "
<< e.getMsg() << endl;
@@ -1945,7 +1945,7 @@ void unitTestKeyEncrypt(DOMImplementatio
}
- catch (XSECException &e)
+ catch (const XSECException &e)
{
cerr << "failed\n";
cerr << "An error occured during signature processing\n Message: ";
@@ -1955,7 +1955,7 @@ void unitTestKeyEncrypt(DOMImplementatio
exit(1);
}
- catch (XSECCryptoException &e)
+ catch (const XSECCryptoException &e)
{
cerr << "failed\n";
cerr << "A cryptographic error occured during signature processing\n Message: "
@@ -2149,7 +2149,7 @@ void unitTestEncrypt(DOMImplementation *
cerr << "Misc. encryption tests" << endl;
unitTestSmallElement(impl);
}
- catch (XSECCryptoException &e)
+ catch (const XSECCryptoException &e)
{
cerr << "failed\n";
cerr << "A cryptographic error occured during encryption unit tests\n Message: "
@@ -2400,7 +2400,7 @@ void testEncrypt(DOMImplementation *impl
cerr << "OK" << endl;
}
- catch (XSECException &e)
+ catch (const XSECException &e)
{
cerr << "An error occured during signature processing\n Message: ";
char * ce = XMLString::transcode(e.getMsg());
@@ -2409,7 +2409,7 @@ void testEncrypt(DOMImplementation *impl
exit(1);
}
- catch (XSECCryptoException &e)
+ catch (const XSECCryptoException &e)
{
cerr << "A cryptographic error occured during signature processing\n Message: "
<< e.getMsg() << endl;
Modified: santuario/xml-security-cpp/trunk/xsec/transformers/TXFMURL.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/transformers/TXFMURL.cpp?rev=1807011&r1=1807010&r2=1807011&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/transformers/TXFMURL.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/transformers/TXFMURL.cpp Fri Sep 1 22:51:20 2017
@@ -127,7 +127,7 @@ unsigned int TXFMURL::readBytes(XMLByte
try {
ret = (unsigned int) is->readBytes(toFill, maxToFill);
}
- catch (NetAccessorException e) {
+ catch (const NetAccessorException& e) {
// Naieve - but assume this means the socket has closed (end of stream)
ret = 0;
Modified: santuario/xml-security-cpp/trunk/xsec/transformers/TXFMXPath.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/transformers/TXFMXPath.cpp?rev=1807011&r1=1807010&r2=1807011&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/transformers/TXFMXPath.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/transformers/TXFMXPath.cpp Fri Sep 1 22:51:20 2017
@@ -482,7 +482,7 @@ void TXFMXPath::evaluateExpr(DOMNode *h,
}
}
- catch (XSLException &e) {
+ catch (const XSLException &e) {
safeBuffer msg;
Modified: santuario/xml-security-cpp/trunk/xsec/transformers/TXFMXPathFilter.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/transformers/TXFMXPathFilter.cpp?rev=1807011&r1=1807010&r2=1807011&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/transformers/TXFMXPathFilter.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/transformers/TXFMXPathFilter.cpp Fri Sep 1 22:51:20 2017
@@ -320,7 +320,7 @@ XSECXPathNodeList * TXFMXPathFilter::eva
}
- catch (XSLException &e) {
+ catch (const XSLException &e) {
safeBuffer msg;
Modified: santuario/xml-security-cpp/trunk/xsec/utils/XSECDOMUtils.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/utils/XSECDOMUtils.cpp?rev=1807011&r1=1807010&r2=1807011&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/utils/XSECDOMUtils.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/utils/XSECDOMUtils.cpp Fri Sep 1 22:51:20 2017
@@ -753,7 +753,7 @@ XMLCh * cleanURIEscapes(const XMLCh * ur
delete[] utf8Path;
return unicodePath;
}
- catch (XMLException&) {
+ catch (const XMLException&) {
}
delete[] utf8Path;
Modified: santuario/xml-security-cpp/trunk/xsec/xenc/impl/XENCCipherImpl.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/xenc/impl/XENCCipherImpl.cpp?rev=1807011&r1=1807010&r2=1807011&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/xenc/impl/XENCCipherImpl.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/xenc/impl/XENCCipherImpl.cpp Fri Sep 1 22:51:20 2017
@@ -382,7 +382,7 @@ XSECCryptoKey * XENCCipherImpl::decryptK
}
}
- catch (XSECCryptoException &) {
+ catch (const XSECCryptoException&) {
/* Do nothing - this is likely to be a bad decrypt on a public key */
} catch (...) {
memset((void *) buffer, 0, 1024);