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/02 18:41:39 UTC
svn commit: r1807071 - in /santuario/xml-security-cpp/trunk/xsec:
tools/c14n/c14n.cpp tools/xklient/xklient.cpp tools/xtest/xtest.cpp
xkms/impl/XKMSRecoverResultImpl.cpp
Author: scantor
Date: Sat Sep 2 18:41:39 2017
New Revision: 1807071
URL: http://svn.apache.org/viewvc?rev=1807071&view=rev
Log:
Indentation / unused variable warnings.
Modified:
santuario/xml-security-cpp/trunk/xsec/tools/c14n/c14n.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/xkms/impl/XKMSRecoverResultImpl.cpp
Modified: santuario/xml-security-cpp/trunk/xsec/tools/c14n/c14n.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/tools/c14n/c14n.cpp?rev=1807071&r1=1807070&r2=1807071&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/tools/c14n/c14n.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/tools/c14n/c14n.cpp Sat Sep 2 18:41:39 2017
@@ -179,17 +179,17 @@ int main(int argc, char **argv) {
}
// Create the canonicalizer
- XSECC14n20010315* canon=NULL;
- if (subtree)
- canon = new XSECC14n20010315(theDOM, subtree);
- else
- canon = new XSECC14n20010315(theDOM);
+ XSECC14n20010315* canon=NULL;
+ if (subtree)
+ canon = new XSECC14n20010315(theDOM, subtree);
+ else
+ canon = new XSECC14n20010315(theDOM);
canon->setCommentsProcessing(printComments);
canon->setUseNamespaceStack(true);
- if (inclusive11)
- canon->setInclusive11();
- else if (exclusive)
- canon->setExclusive();
+ if (inclusive11)
+ canon->setInclusive11();
+ else if (exclusive)
+ canon->setExclusive();
// canon->XPathSelectNodes("(/descendant-or-self::node() | /descendant-or-self::node()/attribute::* | /descendant-or-self::node()/namespace::*)[ self::ietf:e1 or (parent::ietf:e1 and not(self::text() or self::e2)) or count (id(\"E3\") | ancestor-or-self::node()) = count (ancestor-or-self::node())]");
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=1807071&r1=1807070&r2=1807071&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/tools/xklient/xklient.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/tools/xklient/xklient.cpp Sat Sep 2 18:41:39 2017
@@ -3891,7 +3891,6 @@ int doParsedMsgDump(DOMDocument * doc) {
// Get an XKMS Message Factory
XSECProvider prov;
XKMSMessageFactory * factory = prov.getXKMSMessageFactory();
- int errorsOccured;
try {
@@ -3914,13 +3913,11 @@ int doParsedMsgDump(DOMDocument * doc) {
cerr << "An error occurred during message loading\n Message: "
<< msg << endl;
XSEC_RELEASE_XMLCH(msg);
- errorsOccured = true;
return 2;
}
catch (const XSECCryptoException &e) {
cerr << "An error occurred during encryption/signature processing\n Message: "
<< e.getMsg() << endl;
- errorsOccured = true;
#if defined (XSEC_HAVE_OPENSSL)
ERR_load_crypto_strings();
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=1807071&r1=1807070&r2=1807071&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/tools/xtest/xtest.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/tools/xtest/xtest.cpp Sat Sep 2 18:41:39 2017
@@ -952,7 +952,6 @@ void unitTestRSASig(DOMImplementation *
XSECProvider prov;
DSIGSignature *sig;
DOMElement *sigNode;
- DSIGReference *ref[4];
sig = prov.newSignature();
sig->setDSIGNSPrefix(MAKE_UNICODE_STRING("ds"));
@@ -972,10 +971,6 @@ void unitTestRSASig(DOMImplementation *
DOMText * txt= doc->createTextNode(MAKE_UNICODE_STRING("A test string"));
obj->appendChild(txt);
- // Add a Reference
- ref[0] = sig->createReference(MAKE_UNICODE_STRING("#ObjectId"),
- DSIGConstants::s_unicodeStrURISHA1);
-
// Get a key
cerr << "signing ... ";
@@ -2497,7 +2492,6 @@ int main(int argc, char **argv) {
bool doEncryptionUnitTests = true;
bool doSignatureTest = true;
bool doSignatureUnitTests = true;
- bool doXKMSTest = true;
// Testing for which Crypto API to use by default - only really useful on windows
#if !defined(XSEC_HAVE_OPENSSL)
@@ -2535,28 +2529,24 @@ int main(int argc, char **argv) {
doEncryptionTest = false;
doEncryptionUnitTests = false;
doSignatureUnitTests = false;
- doXKMSTest = false;
paramCount++;
}
else if (_stricmp(argv[paramCount], "--encryption-only") == 0 || _stricmp(argv[paramCount], "-e") == 0) {
doSignatureTest = false;
doEncryptionUnitTests = false;
doSignatureUnitTests = false;
- doXKMSTest = false;
paramCount++;
}
else if (_stricmp(argv[paramCount], "--encryption-unit-only") == 0 || _stricmp(argv[paramCount], "-u") == 0) {
doEncryptionTest = false;
doSignatureTest = false;
doSignatureUnitTests = false;
- doXKMSTest = false;
paramCount++;
}
else if (_stricmp(argv[paramCount], "--signature-unit-only") == 0 || _stricmp(argv[paramCount], "-t") == 0) {
doEncryptionTest = false;
doSignatureTest = false;
doEncryptionUnitTests = false;
- doXKMSTest = false;
paramCount++;
}
/* else if (stricmp(argv[paramCount], "--xkms-only") == 0 || stricmp(argv[paramCount], "-x") == 0) {
@@ -2682,17 +2672,6 @@ int main(int argc, char **argv) {
unitTestEncrypt(impl);
}
-/*
- // Running XKMS Base test
- if (doXKMSTest) {
- cerr << endl << "====================================";
- cerr << endl << "Performing XKMS Function";
- cerr << endl << "====================================";
- cerr << endl << endl;
-
- testXKMS(impl);
- }
-*/
cerr << endl << "All tests passed" << endl;
}
Modified: santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSRecoverResultImpl.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSRecoverResultImpl.cpp?rev=1807071&r1=1807070&r2=1807071&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSRecoverResultImpl.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSRecoverResultImpl.cpp Sat Sep 2 18:41:39 2017
@@ -324,15 +324,13 @@ XENCEncryptedData * XKMSRecoverResultImp
}
uri = algorithmSB.sbStrToXMLCh();
}
- else
- uri = algorithmURI;
+ else {
+ uri = algorithmURI;
+ }
// Find if we can get an algorithm for this URI
- XSECAlgorithmHandler *handler;
-
- handler =
- XSECPlatformUtils::g_algorithmMapper->mapURIToHandler(
- uri);
+ XSECAlgorithmHandler *handler =
+ XSECPlatformUtils::g_algorithmMapper->mapURIToHandler(uri);
if (handler == NULL) {
throw XSECException(XSECException::XKMSError,