santuario-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scan...@apache.org
Subject svn commit: r1002847 [2/2] - in /santuario/trunk/c: ./ lib/ m4/ src/enc/NSS/ src/enc/OpenSSL/ src/enc/WinCAPI/ src/framework/ src/tools/checksig/ src/tools/cipher/ src/tools/templatesign/ src/tools/threadTest/ src/tools/xklient/ src/tools/xtest/ src/ut...
Date Wed, 29 Sep 2010 21:16:50 GMT
Modified: santuario/trunk/c/src/framework/XSECW32Config.hpp
URL: http://svn.apache.org/viewvc/santuario/trunk/c/src/framework/XSECW32Config.hpp?rev=1002847&r1=1002846&r2=1002847&view=diff
==============================================================================
--- santuario/trunk/c/src/framework/XSECW32Config.hpp (original)
+++ santuario/trunk/c/src/framework/XSECW32Config.hpp Wed Sep 29 21:16:44 2010
@@ -161,14 +161,14 @@
  * Define presence of cryptographic providers
  */
 
-#define HAVE_OPENSSL 1
+#define XSEC_HAVE_OPENSSL 1
 
-#define HAVE_WINCAPI 1
+#define XSEC_HAVE_WINCAPI 1
 
 // NSS Code is currently alpha.  It should work, but you will also
 // need to include the NSS libraries during the link.
 
-/* #define HAVE_NSS 1 */
+/* #define XSEC_HAVE_NSS 1 */
 
 
 /*
@@ -176,7 +176,7 @@
  *
  */
 
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 
 #	include <openssl/opensslv.h>
 #	if (OPENSSL_VERSION_NUMBER >= 0x00907000)

Modified: santuario/trunk/c/src/tools/checksig/InteropResolver.cpp
URL: http://svn.apache.org/viewvc/santuario/trunk/c/src/tools/checksig/InteropResolver.cpp?rev=1002847&r1=1002846&r2=1002847&view=diff
==============================================================================
--- santuario/trunk/c/src/tools/checksig/InteropResolver.cpp (original)
+++ santuario/trunk/c/src/tools/checksig/InteropResolver.cpp Wed Sep 29 21:16:44 2010
@@ -44,7 +44,7 @@ XERCES_CPP_NAMESPACE_USE
 
 #include <iostream>
 
-#if defined (HAVE_OPENSSL) 
+#if defined (XSEC_HAVE_OPENSSL) 
 
 InteropResolver::InteropResolver(const XMLCh * baseURI) {
 
@@ -656,4 +656,4 @@ XSECKeyInfoResolver * InteropResolver::c
 
 
 
-#endif /* HAVE_OPENSSL */
+#endif /* XSEC_HAVE_OPENSSL */

Modified: santuario/trunk/c/src/tools/checksig/InteropResolver.hpp
URL: http://svn.apache.org/viewvc/santuario/trunk/c/src/tools/checksig/InteropResolver.hpp?rev=1002847&r1=1002846&r2=1002847&view=diff
==============================================================================
--- santuario/trunk/c/src/tools/checksig/InteropResolver.hpp (original)
+++ santuario/trunk/c/src/tools/checksig/InteropResolver.hpp Wed Sep 29 21:16:44 2010
@@ -37,7 +37,7 @@
 #    include <glob.h>
 #endif
 
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 #	include <openssl/x509.h>
 
 class InteropResolver : public XSECKeyInfoResolver {
@@ -73,4 +73,4 @@ private:
 
 };
 
-#endif /* HAVE_OPENSSL */
+#endif /* XSEC_HAVE_OPENSSL */

Modified: santuario/trunk/c/src/tools/checksig/checksig.cpp
URL: http://svn.apache.org/viewvc/santuario/trunk/c/src/tools/checksig/checksig.cpp?rev=1002847&r1=1002846&r2=1002847&view=diff
==============================================================================
--- santuario/trunk/c/src/tools/checksig/checksig.cpp (original)
+++ santuario/trunk/c/src/tools/checksig/checksig.cpp Wed Sep 29 21:16:44 2010
@@ -93,7 +93,7 @@ XALAN_USING_XALAN(XalanTransformer)
 
 #endif
 
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 // OpenSSL
 
 #	include <xsec/enc/OpenSSL/OpenSSLCryptoKeyHMAC.hpp>
@@ -101,14 +101,14 @@ XALAN_USING_XALAN(XalanTransformer)
 
 #endif
 
-#if defined (HAVE_WINCAPI)
+#if defined (XSEC_HAVE_WINCAPI)
 
 #	include <xsec/enc/WinCAPI/WinCAPICryptoProvider.hpp>
 #	include <xsec/enc/WinCAPI/WinCAPICryptoKeyHMAC.hpp>
 
 #endif
 
-#if defined (HAVE_NSS)
+#if defined (XSEC_HAVE_NSS)
 
 #	include <xsec/enc/NSS/NSSCryptoProvider.hpp>
 #	include <xsec/enc/NSS/NSSCryptoKeyHMAC.hpp>
@@ -146,12 +146,12 @@ void printUsage(void) {
 	cerr << "         Use the xml-security test XMLDSig URI resolver\n\n";
 	cerr << "     --idns/-d <ns uri> <name>\n";
 	cerr << "         Define an attribute Id by namespace URI and name\n\n";
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 	cerr << "     --interop/-i\n";
 	cerr << "         Use the interop resolver for Baltimore interop examples\n\n";
 #endif
-#if defined(HAVE_WINCAPI)
-#	if defined (HAVE_OPENSSL)
+#if defined(XSEC_HAVE_WINCAPI)
+#	if defined (XSEC_HAVE_OPENSSL)
 	cerr << "     --wincapi/-w\n";
 	cerr << "         Use the Windows CAPI crypto Provider\n\n";
 #	endif
@@ -176,7 +176,7 @@ int evaluate(int argc, char ** argv) {
 	bool					useXSECURIResolver = false;
 	bool                    useAnonymousResolver = false;
 	bool					useInteropResolver = false;
-#if defined (HAVE_WINCAPI)
+#if defined (XSEC_HAVE_WINCAPI)
 	HCRYPTPROV				win32CSP = 0;
 #endif
 
@@ -214,7 +214,7 @@ int evaluate(int argc, char ** argv) {
 			useIdAttributeNS = argv[paramCount++];
 			useIdAttributeName = argv[paramCount++];
 		}
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 		else if (_stricmp(argv[paramCount], "--interop") == 0 || _stricmp(argv[paramCount], "-i")
== 0) {
 			// Use the interop key resolver
 			useInteropResolver = true;
@@ -225,7 +225,7 @@ int evaluate(int argc, char ** argv) {
 			useAnonymousResolver = true;
 			paramCount++;
 		}
-#if defined (HAVE_WINCAPI)
+#if defined (XSEC_HAVE_WINCAPI)
 		else if (_stricmp(argv[paramCount], "--wincapi") == 0 || _stricmp(argv[paramCount], "-w")
== 0 ||
 			_stricmp(argv[paramCount], "--winhmackey") == 0 || _stricmp(argv[paramCount], "-wh") ==
0) {
 
@@ -307,7 +307,7 @@ int evaluate(int argc, char ** argv) {
 		}
 	}
 
-#if defined (HAVE_WINCAPI) && !defined(HAVE_OPENSSL)
+#if defined (XSEC_HAVE_WINCAPI) && !defined(XSEC_HAVE_OPENSSL)
 
 	// Use default DSS provider
 	WinCAPICryptoProvider * cp = new WinCAPICryptoProvider();
@@ -464,7 +464,7 @@ int evaluate(int argc, char ** argv) {
 			sig->setURIResolver(&theResolver);
 		}
 
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 		if (useInteropResolver == true) {
 
 			InteropResolver ires(&(baseURIXMLCh[8]));
@@ -516,7 +516,7 @@ int evaluate(int argc, char ** argv) {
 		<< e.getMsg() << endl;
 		errorsOccured = true;
 
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 		ERR_load_crypto_strings();
 		BIO * bio_err;
 		if ((bio_err=BIO_new(BIO_s_file())) != NULL)
@@ -551,7 +551,7 @@ int evaluate(int argc, char ** argv) {
 		retResult = 1;
 	}
 
-#if defined (HAVE_WINCAPI)
+#if defined (XSEC_HAVE_WINCAPI)
 	// Clean up the handle to the CSP
 	if (win32CSP != 0)
 		CryptReleaseContext(win32CSP, 0);

Modified: santuario/trunk/c/src/tools/cipher/XencInteropResolver.cpp
URL: http://svn.apache.org/viewvc/santuario/trunk/c/src/tools/cipher/XencInteropResolver.cpp?rev=1002847&r1=1002846&r2=1002847&view=diff
==============================================================================
--- santuario/trunk/c/src/tools/cipher/XencInteropResolver.cpp (original)
+++ santuario/trunk/c/src/tools/cipher/XencInteropResolver.cpp Wed Sep 29 21:16:44 2010
@@ -43,11 +43,11 @@ XERCES_CPP_NAMESPACE_USE
 
 #include <iostream>
 
-#if !defined (HAVE_OPENSSL) && !defined (HAVE_WINCAPI) && !defined (HAVE_NSS)
+#if !defined (XSEC_HAVE_OPENSSL) && !defined (XSEC_HAVE_WINCAPI) && !defined
(XSEC_HAVE_NSS)
 #	error Require OpenSSL or Windows Crypto API for the Merlin Resolver
 #endif
 
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 #	include <openssl/x509.h>
 #	include <openssl/pem.h>
 #	include <xsec/enc/OpenSSL/OpenSSLCryptoX509.hpp>
@@ -55,12 +55,12 @@ XERCES_CPP_NAMESPACE_USE
 #   include <xsec/enc/OpenSSL/OpenSSLCryptoSymmetricKey.hpp>
 #endif
 
-#if defined (HAVE_WINCAPI)
+#if defined (XSEC_HAVE_WINCAPI)
 #   include <xsec/enc/WinCAPI/WinCAPICryptoProvider.hpp>
 #   include <xsec/enc/WinCAPI/WinCAPICryptoSymmetricKey.hpp>
 #endif
 
-#if defined (HAVE_NSS)
+#if defined (XSEC_HAVE_NSS)
 #   include <xsec/enc/NSS/NSSCryptoProvider.hpp>
 #   include <xsec/enc/NSS/NSSCryptoSymmetricKey.hpp>
 #endif
@@ -289,7 +289,7 @@ XSECCryptoSymmetricKey * XencInteropReso
 		return k;
 }
 
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 
 BIO * createFileBIO(const XMLCh * baseURI, const char * name) {
 
@@ -429,7 +429,7 @@ XSECCryptoKey * XencInteropResolver::res
 				}
 				return k;
 			}
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 			if (strEquals(s_phaosRSAName, name)) {
 
 				// This is the Phaos RSA key
@@ -509,7 +509,7 @@ XSECCryptoKey * XencInteropResolver::res
 			XSECCryptoX509 * XCX509 = kix->getCertificateCryptoItem(0);
 
 			if (XCX509 != 0) {
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 
 
 				if (strEquals(XCX509->getProviderName(),DSIGConstants::s_unicodeStrPROVOpenSSL)) {
@@ -535,17 +535,17 @@ XSECCryptoKey * XencInteropResolver::res
 					return k;
 
 				}
-#if defined (HAVE_WINCAPI)
+#if defined (XSEC_HAVE_WINCAPI)
 				else {
-#endif /* HAVE_WINCAPI */
-#endif /* HAVE_OPENSSL */
+#endif /* XSEC_HAVE_WINCAPI */
+#endif /* XSEC_HAVE_OPENSSL */
 
-#if defined (HAVE_WINCAPI)
+#if defined (XSEC_HAVE_WINCAPI)
 					std::cerr << "WARNING - Unable to load PKCS8 private key file into Windows CAPI"
<< std::endl;
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 				}
-#endif /* HAVE_WINCAPI */
-#endif /* HAVE_OPENSSL */
+#endif /* XSEC_HAVE_WINCAPI */
+#endif /* XSEC_HAVE_OPENSSL */
 			}
 		}
 	}

Modified: santuario/trunk/c/src/tools/cipher/cipher.cpp
URL: http://svn.apache.org/viewvc/santuario/trunk/c/src/tools/cipher/cipher.cpp?rev=1002847&r1=1002846&r2=1002847&view=diff
==============================================================================
--- santuario/trunk/c/src/tools/cipher/cipher.cpp (original)
+++ santuario/trunk/c/src/tools/cipher/cipher.cpp Wed Sep 29 21:16:44 2010
@@ -102,11 +102,11 @@ XALAN_USING_XALAN(XalanTransformer)
 
 #endif
 
-#if !defined (HAVE_OPENSSL) && !defined(HAVE_WINCAPI) && !defined(HAVE_NSS)
+#if !defined (XSEC_HAVE_OPENSSL) && !defined(XSEC_HAVE_WINCAPI) && !defined(XSEC_HAVE_NSS)
 #	error No available cryptoAPI
 #endif
 
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 // OpenSSL
 
 #	include <xsec/enc/OpenSSL/OpenSSLCryptoKeyHMAC.hpp>
@@ -118,7 +118,7 @@ XALAN_USING_XALAN(XalanTransformer)
 
 #endif
 
-#if defined (HAVE_WINCAPI)
+#if defined (XSEC_HAVE_WINCAPI)
 
 #	include <xsec/enc/WinCAPI/WinCAPICryptoProvider.hpp>
 #	include <xsec/enc/WinCAPI/WinCAPICryptoSymmetricKey.hpp>
@@ -126,7 +126,7 @@ XALAN_USING_XALAN(XalanTransformer)
 
 #endif
 
-#if defined (HAVE_NSS)
+#if defined (XSEC_HAVE_NSS)
 
 #	include <xsec/enc/NSS/NSSCryptoProvider.hpp>
 #	include <xsec/enc/NSS/NSSCryptoSymmetricKey.hpp>
@@ -188,11 +188,11 @@ void printUsage(void) {
 	cerr << "         Use the interop resolver for Baltimore interop examples\n";
 	cerr << "     --out-file/-o\n";
 	cerr << "         Output the result to the indicated file (rather than stdout)\n";
-#if defined (HAVE_WINCAPI)
+#if defined (XSEC_HAVE_WINCAPI)
 	cerr << "     --wincapi/-w\n";
 	cerr << "         Force use of Windows Crypto API\n";
 #endif
-#if defined (HAVE_NSS)
+#if defined (XSEC_HAVE_NSS)
 	cerr << "     --nss/-n\n";
 	cerr << "         Force use of NSS Crypto API\n";
 #endif
@@ -226,7 +226,7 @@ int evaluate(int argc, char ** argv) {
 	unsigned char			keyBuf[24];
 	XMLFormatTarget			*formatTarget ;
 
-#if defined(_WIN32) && defined (HAVE_WINCAPI)
+#if defined(_WIN32) && defined (XSEC_HAVE_WINCAPI)
 	HCRYPTPROV				win32DSSCSP = 0;		// Crypto Providers
 	HCRYPTPROV				win32RSACSP = 0;
 
@@ -288,7 +288,7 @@ int evaluate(int argc, char ** argv) {
 			isXKMSKey = true;
 		}
 
-#if defined (HAVE_WINCAPI)
+#if defined (XSEC_HAVE_WINCAPI)
 		else if (_stricmp(argv[paramCount], "--wincapi") == 0 || _stricmp(argv[paramCount], "-w")
== 0) {
 			// Use the interop key resolver
 			WinCAPICryptoProvider * cp = new WinCAPICryptoProvider();
@@ -296,7 +296,7 @@ int evaluate(int argc, char ** argv) {
 			paramCount++;
 		}
 #endif
-#if defined (HAVE_NSS)
+#if defined (XSEC_HAVE_NSS)
 		else if (_stricmp(argv[paramCount], "--nss") == 0 || _stricmp(argv[paramCount], "-n") ==
0) {
 			// NSS Crypto Provider
 			NSSCryptoProvider * cp = new NSSCryptoProvider();
@@ -396,7 +396,7 @@ int evaluate(int argc, char ** argv) {
 			}
 
 
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 
 			else if (_stricmp(argv[paramCount], "RSA") == 0) {
 				// RSA private key file
@@ -519,7 +519,7 @@ int evaluate(int argc, char ** argv) {
 				paramCount += 2;
 				
 			} /* argv[1] = "--x509cert" */
-#endif /* HAVE_OPENSSL */
+#endif /* XSEC_HAVE_OPENSSL */
 			else {
 				printUsage();
 				return 2;
@@ -797,7 +797,7 @@ int evaluate(int argc, char ** argv) {
 			delete formatTarget;
 		doc->release();
 
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 		ERR_load_crypto_strings();
 		BIO * bio_err;
 		if ((bio_err=BIO_new(BIO_s_file())) != NULL)

Modified: santuario/trunk/c/src/tools/templatesign/templatesign.cpp
URL: http://svn.apache.org/viewvc/santuario/trunk/c/src/tools/templatesign/templatesign.cpp?rev=1002847&r1=1002846&r2=1002847&view=diff
==============================================================================
--- santuario/trunk/c/src/tools/templatesign/templatesign.cpp (original)
+++ santuario/trunk/c/src/tools/templatesign/templatesign.cpp Wed Sep 29 21:16:44 2010
@@ -43,7 +43,7 @@
 #	include <xsec/utils/unixutils/XSECURIResolverGenericUnix.hpp>
 #endif
 
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 #	include <xsec/enc/OpenSSL/OpenSSLCryptoKeyDSA.hpp>
 #	include <xsec/enc/OpenSSL/OpenSSLCryptoKeyEC.hpp>
 #	include <xsec/enc/OpenSSL/OpenSSLCryptoKeyRSA.hpp>
@@ -57,7 +57,7 @@
 #	include <openssl/pem.h>
 #endif
 
-#if defined(HAVE_WINCAPI)
+#if defined(XSEC_HAVE_WINCAPI)
 #	include <xsec/enc/WinCAPI/WinCAPICryptoProvider.hpp>
 #	include <xsec/enc/WinCAPI/WinCAPICryptoKeyDSA.hpp>
 #	include <xsec/enc/WinCAPI/WinCAPICryptoKeyRSA.hpp>
@@ -536,14 +536,14 @@ unsigned char *charBuffer;
 void printUsage(void) {
 
 	cerr << "\nUsage: templatesign <key options> <file to sign>\n\n";
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 	cerr << "    Where <key options> are one of :\n\n";
 	cerr << "        --x509subjectname/-s <distinguished name>\n";
 	cerr << "                     <distinguished name> will be set as SubjectName
in x509\n";
 	cerr << "        --dsakey/-d  <dsa private key file> <password>\n";
 	cerr << "                     <dsa private key file> contains a PEM encoded
private key\n";
 	cerr << "                     <password> is the password used to decrypt the
key file\n";
-#	if defined (HAVE_WINCAPI)
+#	if defined (XSEC_HAVE_WINCAPI)
 	cerr << "                     NOTE: Not usable if --wincapi previously set\n";
 #	endif
 #   if defined(XSEC_OPENSSL_HAVE_EC)
@@ -551,7 +551,7 @@ void printUsage(void) {
 	cerr << "                     <ec private key file> contains a PEM encoded private
key\n";
 	cerr << "                     <password> is the password used to decrypt the
key file\n";
 #   endif
-#	if defined (HAVE_WINCAPI)
+#	if defined (XSEC_HAVE_WINCAPI)
 	cerr << "                     NOTE: Not usable if --wincapi previously set\n";
 #	endif
 	cerr << "        --rsakey/-r <rsa private key file> <password>\n";
@@ -564,7 +564,7 @@ void printUsage(void) {
 	cerr << "                     <string> is the hmac key to set\n";
 	cerr << "        --clearkeys/-c\n";
 	cerr << "                      Clears out any current KeyInfo elements in the file\n";
-#if defined(HAVE_WINCAPI)
+#if defined(XSEC_HAVE_WINCAPI)
 	cerr << "        --windss/-wd\n";
 	cerr << "                      Use the default user AT_SIGNATURE key from default\n";
 	cerr << "                      Windows DSS CSP\n";
@@ -592,13 +592,13 @@ int main(int argc, char **argv) {
 	XSECCryptoKey				* key = NULL;
 	DSIGKeyInfoX509				* keyInfoX509 = NULL;
 	const char					* x509SubjectName = NULL;
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 	OpenSSLCryptoX509			* certs[128];
 #endif
 	int							certCount = 0;
 	int							paramCount;
 	bool						clearKeyInfo = false;
-#if defined(HAVE_WINCAPI)
+#if defined(XSEC_HAVE_WINCAPI)
 	HCRYPTPROV					win32DSSCSP = 0;		// Crypto Provider
 	HCRYPTPROV					win32RSACSP = 0;		// Crypto Provider
 	bool						winDssKeyInfo = false;
@@ -628,7 +628,7 @@ int main(int argc, char **argv) {
 
 	}
 
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 	
 	// Initialise OpenSSL
 	ERR_load_crypto_strings();
@@ -665,7 +665,7 @@ int main(int argc, char **argv) {
 			paramCount += 2;
 		}
 
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 
 		else if (_stricmp(argv[paramCount], "--dsakey") == 0 || _stricmp(argv[paramCount], "-d")
== 0
 			|| _stricmp(argv[paramCount], "--rsakey") == 0 || _stricmp(argv[paramCount], "-r") ==
0
@@ -818,10 +818,10 @@ int main(int argc, char **argv) {
 #endif
 		if (_stricmp(argv[paramCount], "--hmackey") == 0 || _stricmp(argv[paramCount], "-h") ==
0) {
 
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 			OpenSSLCryptoKeyHMAC * hmacKey = new OpenSSLCryptoKeyHMAC();
 #else
-#	if defined (HAVE_WINCAPI)
+#	if defined (XSEC_HAVE_WINCAPI)
 			WinCAPICryptoKeyHMAC * hmacKey = new WinCAPICryptoKeyHMAC(0);
 #	endif
 #endif
@@ -838,7 +838,7 @@ int main(int argc, char **argv) {
 
 		}
 
-#if defined (HAVE_WINCAPI)
+#if defined (XSEC_HAVE_WINCAPI)
 		else if (_stricmp(argv[paramCount], "--windss") == 0 || _stricmp(argv[paramCount], "-wd")
== 0) {
 
 			WinCAPICryptoProvider * cp;
@@ -1078,7 +1078,7 @@ int main(int argc, char **argv) {
 
 #endif /* CRYPT_ACQUIRE_CACHE_FLAG */
 
-#endif /* HAVE_WINCAPI */
+#endif /* XSEC_HAVE_WINCAPI */
 
 		else {
 
@@ -1210,7 +1210,7 @@ int main(int argc, char **argv) {
 
 		// Add any KeyInfo elements
 
-#if defined(HAVE_WINCAPI)
+#if defined(XSEC_HAVE_WINCAPI)
 
 		if (winDssKeyInfo == true && winKeyDSA != NULL) {
 			char pBuf[1024];
@@ -1253,7 +1253,7 @@ int main(int argc, char **argv) {
 		}
 
 #endif
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 		if (certCount > 0) {
 
 			int i;
@@ -1375,7 +1375,7 @@ int main(int argc, char **argv) {
 	delete gFormatter;
 	delete formatTarget;
 
-#if defined (_WIN32) && defined (HAVE_WINCAPI)
+#if defined (_WIN32) && defined (XSEC_HAVE_WINCAPI)
 	if (win32DSSCSP != 0)
 		CryptReleaseContext(win32DSSCSP,0);
 	if (win32RSACSP != 0)

Modified: santuario/trunk/c/src/tools/threadTest/threadtest.cpp
URL: http://svn.apache.org/viewvc/santuario/trunk/c/src/tools/threadTest/threadtest.cpp?rev=1002847&r1=1002846&r2=1002847&view=diff
==============================================================================
--- santuario/trunk/c/src/tools/threadTest/threadtest.cpp (original)
+++ santuario/trunk/c/src/tools/threadTest/threadtest.cpp Wed Sep 29 21:16:44 2010
@@ -31,10 +31,10 @@
 #include <xsec/framework/XSECProvider.hpp>
 #include <xsec/dsig/DSIGSignature.hpp>
 #include <xsec/dsig/DSIGReference.hpp>
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 #	include <xsec/enc/OpenSSL/OpenSSLCryptoKeyHMAC.hpp>
 #else
-#	if defined (HAVE_WINCAPI)
+#	if defined (XSEC_HAVE_WINCAPI)
 #		include <xsec/enc/WinCAPI/WinCAPICryptoKeyHMAC.hpp>
 #	else
 #		error No crypto provider available
@@ -276,7 +276,7 @@ DWORD WINAPI doSignThread (LPVOID Param)
 
 		sig->appendKeyName(MAKE_UNICODE_STRING("The secret key is \"secret\""));
 
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 		OpenSSLCryptoKeyHMAC * hmacKey = new OpenSSLCryptoKeyHMAC();
 #else
 		WinCAPICryptoKeyHMAC * hmacKey = new WinCAPICryptoKeyHMAC(0);
@@ -390,7 +390,7 @@ DWORD WINAPI doVerifyThread (LPVOID Para
 
 		DSIGSignature * sig = g_provider->newSignatureFromDOM(myDoc);
 
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 		OpenSSLCryptoKeyHMAC *hmacKey = new OpenSSLCryptoKeyHMAC();
 #else
 		WinCAPICryptoKeyHMAC *hmacKey = new WinCAPICryptoKeyHMAC(0);

Modified: santuario/trunk/c/src/tools/xklient/xklient.cpp
URL: http://svn.apache.org/viewvc/santuario/trunk/c/src/tools/xklient/xklient.cpp?rev=1002847&r1=1002846&r2=1002847&view=diff
==============================================================================
--- santuario/trunk/c/src/tools/xklient/xklient.cpp (original)
+++ santuario/trunk/c/src/tools/xklient/xklient.cpp Wed Sep 29 21:16:44 2010
@@ -123,7 +123,7 @@ XALAN_USING_XALAN(XalanTransformer)
 
 #endif
 
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 // OpenSSL
 
 #	include <openssl/err.h>
@@ -279,7 +279,7 @@ XSECCryptoX509 * loadX509(const char * i
 
 }
 
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 
 XMLCh * BN2b64(BIGNUM * bn) {
 
@@ -556,7 +556,7 @@ XKMSMessageAbstractType * createLocateRe
 			lr->appendResponseMechanismItem(MAKE_UNICODE_STRING(argv[paramCount]));
 			paramCount++;
 		}
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 		else if (_stricmp(argv[paramCount], "--sign-dsa") == 0 || _stricmp(argv[paramCount], "-sd")
== 0 ||
 				_stricmp(argv[paramCount], "--sign-rsa") == 0 || _stricmp(argv[paramCount], "-sr") ==
0) {
 			if (paramCount >= argc + 2) {
@@ -828,7 +828,7 @@ XKMSMessageAbstractType * createValidate
 			qkb->appendUseKeyWithItem(MAKE_UNICODE_STRING(argv[paramCount]), MAKE_UNICODE_STRING(argv[paramCount
+ 1]));
 			paramCount += 2;
 		}
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 		else if (_stricmp(argv[paramCount], "--sign-dsa") == 0 || _stricmp(argv[paramCount], "-sd")
== 0 ||
 				_stricmp(argv[paramCount], "--sign-rsa") == 0 || _stricmp(argv[paramCount], "-sr") ==
0) {
 			if (paramCount >= argc + 2) {
@@ -993,7 +993,7 @@ void printRegisterRequestUsage(void) {
 	cerr << "           : Add the RSA key as a keyvalue\n";
 	cerr << "   --revocation/-v <phrase> : Set <phrase> as revocation code\n";
 	cerr << "   --kek/-k <phrase>        : Key phrase to use for PrivateKey decryption\n";
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 	cerr << "   --output-private-key/-p <file> <pass phrase>\n";
 	cerr << "                            : Write PEM encoded private key to file\n";
 #endif
@@ -1110,7 +1110,7 @@ XKMSMessageAbstractType * createRegister
 			pkb->appendUseKeyWithItem(MAKE_UNICODE_STRING(argv[paramCount]), MAKE_UNICODE_STRING(argv[paramCount
+ 1]));
 			paramCount += 2;
 		}
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 		else if (_stricmp(argv[paramCount], "--output-private-key") == 0 || _stricmp(argv[paramCount],
"-p") == 0) {
 			if (paramCount >= argc + 2) {
 				printRegisterRequestUsage();
@@ -1179,7 +1179,7 @@ XKMSMessageAbstractType * createRegister
 			paramCount++;
 
 		}
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 		else if (_stricmp(argv[paramCount], "--sign-dsa") == 0 || _stricmp(argv[paramCount], "-sd")
== 0 ||
 				_stricmp(argv[paramCount], "--sign-rsa") == 0 || _stricmp(argv[paramCount], "-sr") ==
0) {
 			if (paramCount >= argc + 2) {
@@ -1572,7 +1572,7 @@ XKMSMessageAbstractType * createRevokeRe
 			paramCount++;
 
 		}
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 		else if (_stricmp(argv[paramCount], "--sign-dsa") == 0 || _stricmp(argv[paramCount], "-sd")
== 0 ||
 				_stricmp(argv[paramCount], "--sign-rsa") == 0 || _stricmp(argv[paramCount], "-sr") ==
0) {
 			if (paramCount >= argc + 2) {
@@ -1927,7 +1927,7 @@ XKMSMessageAbstractType * createReissueR
 			paramCount++;
 
 		}
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 		else if (_stricmp(argv[paramCount], "--sign-dsa") == 0 || _stricmp(argv[paramCount], "-sd")
== 0 ||
 				_stricmp(argv[paramCount], "--sign-rsa") == 0 || _stricmp(argv[paramCount], "-sr") ==
0) {
 			if (paramCount >= argc + 2) {
@@ -2165,7 +2165,7 @@ void printRecoverRequestUsage(void) {
 	cerr << "   --add-value-rsa/-vr <filename> <passphrase>\n";
 	cerr << "           : Add the RSA key as a keyvalue\n";
 	cerr << "   --kek/-k <phrase>        : Key phrase to use for PrivateKey decryption\n";
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 	cerr << "   --output-private-key/-p <file> <pass phrase>\n";
 	cerr << "                            : Write PEM encoded private key to file\n";
 #endif	
@@ -2279,7 +2279,7 @@ XKMSMessageAbstractType * createRecoverR
 			}
 			g_authPassPhrase = argv[paramCount++];
 		}
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 		else if (_stricmp(argv[paramCount], "--output-private-key") == 0 || _stricmp(argv[paramCount],
"-p") == 0) {
 			if (paramCount >= argc + 2) {
 				printRecoverRequestUsage();
@@ -2321,7 +2321,7 @@ XKMSMessageAbstractType * createRecoverR
 			paramCount++;
 
 		}
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 		else if (_stricmp(argv[paramCount], "--sign-dsa") == 0 || _stricmp(argv[paramCount], "-sd")
== 0 ||
 				_stricmp(argv[paramCount], "--sign-rsa") == 0 || _stricmp(argv[paramCount], "-sr") ==
0) {
 			if (paramCount >= argc + 2) {
@@ -3240,7 +3240,7 @@ int doRegisterResultDump(XKMSRegisterRes
 			char * sInverseQ = XMLString::transcode(kp->getInverseQ());
 			char * sD = XMLString::transcode(kp->getD());
 
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 
 			if (g_privateKeyFile != NULL) {
 				levelSet(level);
@@ -3356,7 +3356,7 @@ int doRecoverResultDump(XKMSRecoverResul
 			char * sInverseQ = XMLString::transcode(kp->getInverseQ());
 			char * sD = XMLString::transcode(kp->getD());
 
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 
 			if (g_privateKeyFile != NULL) {
 				levelSet(level);
@@ -3840,7 +3840,7 @@ int doParsedMsgDump(DOMDocument * doc) {
 		<< e.getMsg() << endl;
 		errorsOccured = true;
 
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 		ERR_load_crypto_strings();
 		BIO * bio_err;
 		if ((bio_err=BIO_new(BIO_s_file())) != NULL)
@@ -4350,7 +4350,7 @@ void printMsgDumpUsage(void) {
 	cerr << "   --validate/-v  : validate the input messages\n";
 	cerr << "   --auth-phrase/-a <phrase>\n";
 	cerr << "                  : use <phrase> for authentication/private key in
X-KRSS messages\n";
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 	cerr << "   --output-private-key/-p <filename> <passphrase>\n";
 	cerr << "                  : Write private keys from Register or Recover requests
to the file\n\n";
 #endif
@@ -4385,7 +4385,7 @@ int doMsgDump(int argc, char ** argv, in
 			g_authPassPhrase = argv[paramCount];
 			paramCount++;
 		}
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 		else if (_stricmp(argv[paramCount], "--output-private-key") == 0 || _stricmp(argv[paramCount],
"-p") == 0) {
 			if (paramCount >= argc + 2) {
 				printMsgDumpUsage();

Modified: santuario/trunk/c/src/tools/xtest/xtest.cpp
URL: http://svn.apache.org/viewvc/santuario/trunk/c/src/tools/xtest/xtest.cpp?rev=1002847&r1=1002846&r2=1002847&view=diff
==============================================================================
--- santuario/trunk/c/src/tools/xtest/xtest.cpp (original)
+++ santuario/trunk/c/src/tools/xtest/xtest.cpp Wed Sep 29 21:16:44 2010
@@ -89,19 +89,19 @@ XALAN_USING_XALAN(XalanTransformer)
 
 #include <xsec/enc/XSECCryptoSymmetricKey.hpp>
 
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 #	include <xsec/enc/OpenSSL/OpenSSLCryptoKeyHMAC.hpp>
 #	include <xsec/enc/OpenSSL/OpenSSLCryptoKeyRSA.hpp>
 #	include <openssl/rand.h>
 #	include <openssl/evp.h>
 #	include <openssl/pem.h>
 #endif
-#if defined (HAVE_WINCAPI)
+#if defined (XSEC_HAVE_WINCAPI)
 #	include <xsec/enc/WinCAPI/WinCAPICryptoKeyHMAC.hpp>
 #	include <xsec/enc/WinCAPI/WinCAPICryptoKeyRSA.hpp>
 #	include <xsec/enc/WinCAPI/WinCAPICryptoProvider.hpp>
 #endif
-#if defined (HAVE_NSS)
+#if defined (XSEC_HAVE_NSS)
 #	include <xsec/enc/NSS/NSSCryptoKeyHMAC.hpp>
 #	include <xsec/enc/NSS/NSSCryptoKeyRSA.hpp>
 #	include <xsec/enc/NSS/NSSCryptoProvider.hpp>
@@ -344,20 +344,20 @@ XSECCryptoKeyHMAC * createHMACKey(const 
 	// Create the HMAC key
 	XSECCryptoKeyHMAC * hmacKey = NULL;
 
-#if defined(HAVE_WINCAPI)
+#if defined(XSEC_HAVE_WINCAPI)
 
 	if (g_useWinCAPI == true) {
 		hmacKey = new WinCAPICryptoKeyHMAC(0);
 	}
 #endif
 
-# if defined (HAVE_NSS)
+# if defined (XSEC_HAVE_NSS)
 	if (g_useNSS == true) {
 		hmacKey = new NSSCryptoKeyHMAC();
 	}
 #endif
 
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 	if (hmacKey == NULL)
 		hmacKey = new OpenSSLCryptoKeyHMAC();
 #endif
@@ -1031,7 +1031,7 @@ void unitTestRSASig(DOMImplementation * 
 		cerr << "OK";
 
 #if 0
-#if defined HAVE_OPENSSL
+#if defined XSEC_HAVE_OPENSSL
 
 		if (g_useWinCAPI || g_useNSS) {
 
@@ -1090,7 +1090,7 @@ void unitTestRSA(DOMImplementation * imp
 
 	XSECCryptoKeyRSA * rsaKey;
 
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 	if (!g_useWinCAPI && !g_useNSS) {
 		// Load the key
 		BIO * bioMem = BIO_new(BIO_s_mem());
@@ -1104,7 +1104,7 @@ void unitTestRSA(DOMImplementation * imp
 	}
 #endif
 
-#if defined (HAVE_WINCAPI)
+#if defined (XSEC_HAVE_WINCAPI)
 	if (g_useWinCAPI) {
 
 		// Use the internal key
@@ -1116,7 +1116,7 @@ void unitTestRSA(DOMImplementation * imp
 
 #endif
 
-#if defined (HAVE_NSS)
+#if defined (XSEC_HAVE_NSS)
 	if (g_useNSS) {
 		// Use the internal key
 		NSSCryptoProvider *cp = (NSSCryptoProvider *) (XSECPlatformUtils::g_cryptoProvider);
@@ -2024,7 +2024,7 @@ void unitTestEncrypt(DOMImplementation *
 		// Key wraps
 		cerr << "RSA key wrap... ";
 
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 		if (!g_useWinCAPI && !g_useNSS) {
 			// Load the key
 			BIO * bioMem = BIO_new(BIO_s_mem());
@@ -2050,7 +2050,7 @@ void unitTestEncrypt(DOMImplementation *
 		}
 #endif
 
-#if defined (HAVE_WINCAPI)
+#if defined (XSEC_HAVE_WINCAPI)
 		if (g_useWinCAPI) {
 
 			// Use the internal key
@@ -2067,7 +2067,7 @@ void unitTestEncrypt(DOMImplementation *
 
 #endif
 
-#if defined (HAVE_NSS)
+#if defined (XSEC_HAVE_NSS)
 		if (g_useNSS) {
 			// Use the internal key
 			NSSCryptoProvider *cp = (NSSCryptoProvider *) (XSECPlatformUtils::g_cryptoProvider);
@@ -2507,11 +2507,11 @@ void printUsage(void) {
 	cerr << "     Where options are :\n\n";
 	cerr << "     --help/-h\n";
 	cerr << "         This help message\n\n";
-#if defined (HAVE_WINCAPI)  && defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_WINCAPI)  && defined (XSEC_HAVE_OPENSSL)
 	cerr << "     --wincapi/-w\n";
 	cerr << "         Use Windows Crypto API for crypto functionality\n\n";
 #endif
-#if defined (HAVE_NSS)
+#if defined (XSEC_HAVE_NSS)
 	cerr << "     --nss/-n\n";
 	cerr << "         Use NSS Crypto API for crypto functionality\n\n";
 #endif
@@ -2562,13 +2562,13 @@ int main(int argc, char **argv) {
 			g_printDocs = true;
 			paramCount++;
 		}
-#if defined(HAVE_WINCAPI) && defined(HAVE_OPENSSL)
+#if defined(XSEC_HAVE_WINCAPI) && defined(XSEC_HAVE_OPENSSL)
 		else if (_stricmp(argv[paramCount], "--wincapi") == 0 || _stricmp(argv[paramCount], "-w")
== 0) {
 			g_useWinCAPI = true;
 			paramCount++;
 		}
 #endif
-#if defined(HAVE_NSS)
+#if defined(XSEC_HAVE_NSS)
 		else if (stricmp(argv[paramCount], "--nss") == 0 || stricmp(argv[paramCount], "-n") ==
0) {
 			g_useNSS = true;
 			paramCount++;
@@ -2641,7 +2641,7 @@ int main(int argc, char **argv) {
 #endif
 		XSECPlatformUtils::Initialise();
 
-#if defined (HAVE_OPENSSL) && defined (HAVE_WINCAPI)
+#if defined (XSEC_HAVE_OPENSSL) && defined (XSEC_HAVE_WINCAPI)
 		if (g_useWinCAPI) {
 			// Setup for Windows Crypt API
 			WinCAPICryptoProvider * cp;
@@ -2650,7 +2650,7 @@ int main(int argc, char **argv) {
 			XSECPlatformUtils::SetCryptoProvider(cp);
 		}
 #endif
-#if defined (HAVE_NSS)
+#if defined (XSEC_HAVE_NSS)
 		if (g_useNSS) {
 			// Setup for NSS Crypt API
 			NSSCryptoProvider * cp;

Modified: santuario/trunk/c/src/utils/XSECPlatformUtils.cpp
URL: http://svn.apache.org/viewvc/santuario/trunk/c/src/utils/XSECPlatformUtils.cpp?rev=1002847&r1=1002846&r2=1002847&view=diff
==============================================================================
--- santuario/trunk/c/src/utils/XSECPlatformUtils.cpp (original)
+++ santuario/trunk/c/src/utils/XSECPlatformUtils.cpp Wed Sep 29 21:16:44 2010
@@ -43,15 +43,15 @@ XERCES_CPP_NAMESPACE_USE
 #include <xsec/utils/winutils/XSECBinHTTPURIInputStream.hpp>
 #endif
 
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 #	include <xsec/enc/OpenSSL/OpenSSLCryptoProvider.hpp>
 #endif
 
-#if defined (HAVE_WINCAPI)
+#if defined (XSEC_HAVE_WINCAPI)
 #	include <xsec/enc/WinCAPI/WinCAPICryptoProvider.hpp>
 #endif
 
-#if defined (HAVE_NSS)
+#if defined (XSEC_HAVE_NSS)
 #	include <xsec/enc/NSS/NSSCryptoProvider.hpp>
 #endif
 
@@ -68,13 +68,13 @@ XSECPlatformUtils::TransformFactory* XSE
 
 // Determine default crypto provider
 
-#if defined (HAVE_OPENSSL)
+#if defined (XSEC_HAVE_OPENSSL)
 #	define XSEC_DEFAULT_PROVIDER	OpenSSLCryptoProvider()
 #else
-#	if defined (HAVE_WINCAPI)
+#	if defined (XSEC_HAVE_WINCAPI)
 #		define XSEC_DEFAULT_PROVIDER	WinCAPICryptoProvider()
 #	else 
-#		if defined (HAVE_NSS)
+#		if defined (XSEC_HAVE_NSS)
 #			define XSEC_DEFAULT_PROVIDER	NSSCryptoProvider()
 #		endif
 #	endif



Mime
View raw message