blautenb 2003/10/15 00:55:38
Modified: c/src/tools/cipher cipher.cpp
Log:
Clean up of OpenSSL code
Revision Changes Path
1.5 +13 -1 xml-security/c/src/tools/cipher/cipher.cpp
Index: cipher.cpp
===================================================================
RCS file: /home/cvs/xml-security/c/src/tools/cipher/cipher.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- cipher.cpp 13 Oct 2003 11:08:02 -0000 1.4
+++ cipher.cpp 15 Oct 2003 07:55:37 -0000 1.5
@@ -186,6 +186,10 @@
cerr << " Use the key provided in [key string] to
encrypt/decrypt\n";
cerr << " --interop/-i\n";
cerr << " Use the interop resolver for Baltimore interop
examples\n";
+#if defined (HAVE_OPENSSL) && defined (HAVE_WINCAPI)
+ cerr << " --wincapi/-w\n";
+ cerr << " Use Windows Crypto API rather than OpenSSL\n";
+#endif
cerr << "\n Exits with codes :\n";
cerr << " 0 = Decrypt/Encrypt OK\n";
@@ -231,6 +235,14 @@
useInteropResolver = true;
paramCount++;
}
+#if defined (HAVE_WINCAPI) && defined (HAVE_OPENSSL)
+ else if (stricmp(argv[paramCount], "--wincapi") == 0 ||
stricmp(argv[paramCount], "-w") == 0) {
+ // Use the interop key resolver
+ WinCAPICryptoProvider * cp = new
WinCAPICryptoProvider();
+ XSECPlatformUtils::SetCryptoProvider(cp);
+ paramCount++;
+ }
+#endif
else if (stricmp(argv[paramCount], "--key") == 0 ||
stricmp(argv[paramCount], "-k") == 0) {
// Have set a key string