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 2010/09/30 02:15:59 UTC
svn commit: r1002906 - in /santuario/trunk/c: ./ src/canon/ src/enc/WinCAPI/
src/framework/ src/tools/checksig/ src/tools/cipher/
src/tools/templatesign/ src/tools/txfmout/ src/tools/xtest/
Author: scantor
Date: Thu Sep 30 00:15:59 2010
New Revision: 1002906
URL: http://svn.apache.org/viewvc?rev=1002906&view=rev
Log:
Add back strcasecmp check and fix some other broken function calls.
Modified:
santuario/trunk/c/configure.ac
santuario/trunk/c/src/canon/XSECC14n20010315.cpp
santuario/trunk/c/src/enc/WinCAPI/WinCAPICryptoProvider.cpp
santuario/trunk/c/src/framework/XSECDefs.hpp
santuario/trunk/c/src/tools/checksig/checksig.cpp
santuario/trunk/c/src/tools/cipher/cipher.cpp
santuario/trunk/c/src/tools/templatesign/templatesign.cpp
santuario/trunk/c/src/tools/txfmout/txfmout.cpp
santuario/trunk/c/src/tools/xtest/xtest.cpp
Modified: santuario/trunk/c/configure.ac
URL: http://svn.apache.org/viewvc/santuario/trunk/c/configure.ac?rev=1002906&r1=1002905&r2=1002906&view=diff
==============================================================================
--- santuario/trunk/c/configure.ac (original)
+++ santuario/trunk/c/configure.ac Thu Sep 30 00:15:59 2010
@@ -72,6 +72,8 @@ AC_CHECK_LIB(socket, getservent)
# Check for required includes
AC_CHECK_HEADERS(unistd.h direct.h)
+AC_CHECK_DECL(strcasecmp,[AC_DEFINE([XSEC_HAVE_STRCASECMP],[1],[Define to 1 if strcasecmp present.])],,[#include <string.h>])
+
AC_LANG(C++)
# Xerces is required
Modified: santuario/trunk/c/src/canon/XSECC14n20010315.cpp
URL: http://svn.apache.org/viewvc/santuario/trunk/c/src/canon/XSECC14n20010315.cpp?rev=1002906&r1=1002905&r2=1002906&view=diff
==============================================================================
--- santuario/trunk/c/src/canon/XSECC14n20010315.cpp (original)
+++ santuario/trunk/c/src/canon/XSECC14n20010315.cpp Thu Sep 30 00:15:59 2010
@@ -272,7 +272,7 @@ void XSECC14n20010315::setExclusive(char
else {
// Add this to the list
- m_exclNSList.push_back(_strdup(nsBuf));
+ m_exclNSList.push_back(strdup(nsBuf));
}
Modified: santuario/trunk/c/src/enc/WinCAPI/WinCAPICryptoProvider.cpp
URL: http://svn.apache.org/viewvc/santuario/trunk/c/src/enc/WinCAPI/WinCAPICryptoProvider.cpp?rev=1002906&r1=1002905&r2=1002906&view=diff
==============================================================================
--- santuario/trunk/c/src/enc/WinCAPI/WinCAPICryptoProvider.cpp (original)
+++ santuario/trunk/c/src/enc/WinCAPI/WinCAPICryptoProvider.cpp Thu Sep 30 00:15:59 2010
@@ -143,12 +143,12 @@ WinCAPICryptoProvider::WinCAPICryptoProv
// Copy parameters for later use
if (provDSSName != NULL)
- m_provDSSName = _strdup(provDSSName);
+ m_provDSSName = strdup(provDSSName);
else
m_provDSSName = NULL;
if (provRSAName != NULL)
- m_provRSAName = _strdup(provRSAName);
+ m_provRSAName = strdup(provRSAName);
else
m_provRSAName = NULL;
Modified: santuario/trunk/c/src/framework/XSECDefs.hpp
URL: http://svn.apache.org/viewvc/santuario/trunk/c/src/framework/XSECDefs.hpp?rev=1002906&r1=1002905&r2=1002906&view=diff
==============================================================================
--- santuario/trunk/c/src/framework/XSECDefs.hpp (original)
+++ santuario/trunk/c/src/framework/XSECDefs.hpp Thu Sep 30 00:15:59 2010
@@ -161,33 +161,12 @@
#endif
-
-/*
- * The following definitions are *only* made if we are
- * building library code to make sure we don't interfere
- * with the way apps are doing things
- */
-
#ifdef XSEC_LIBRARY_BUILD
-
-# ifndef XSEC_HAVE__STRDUP
-# define _strdup(x) strdup(x)
-# endif
-
-# ifndef XSEC_HAVE__STRICMP
-# ifdef XSEC_HAVE_STRICMP
-# define _stricmp(x,y) stricmp(x,y)
-# else
-# ifdef XSEC_HAVE_STRCASECMP
-# define _stricmp(x,y) strcasecmp(x,y)
-# endif
-# endif
-# endif
-
-# ifndef XSEC_HAVE__GETCWD
-# define _getcwd(x,y) getcwd(x,y)
-# endif
-
+# ifdef XSEC_HAVE_STRCASECMP
+# define _stricmp(x,y) strcasecmp(x,y)
+# else
+# define _stricmp(x,y) stricmp(x,y)
+# endif
#endif
#endif /* XSECDEFS_HEADER */
Modified: santuario/trunk/c/src/tools/checksig/checksig.cpp
URL: http://svn.apache.org/viewvc/santuario/trunk/c/src/tools/checksig/checksig.cpp?rev=1002906&r1=1002905&r2=1002906&view=diff
==============================================================================
--- santuario/trunk/c/src/tools/checksig/checksig.cpp (original)
+++ santuario/trunk/c/src/tools/checksig/checksig.cpp Thu Sep 30 00:15:59 2010
@@ -422,7 +422,7 @@ int evaluate(int argc, char ** argv) {
// Map out base path of the file
char path[_MAX_PATH];
char baseURI[(_MAX_PATH * 2) + 10];
- _getcwd(path, _MAX_PATH);
+ getcwd(path, _MAX_PATH);
strcpy(baseURI, "file:///");
Modified: santuario/trunk/c/src/tools/cipher/cipher.cpp
URL: http://svn.apache.org/viewvc/santuario/trunk/c/src/tools/cipher/cipher.cpp?rev=1002906&r1=1002905&r2=1002906&view=diff
==============================================================================
--- santuario/trunk/c/src/tools/cipher/cipher.cpp (original)
+++ santuario/trunk/c/src/tools/cipher/cipher.cpp Thu Sep 30 00:15:59 2010
@@ -626,7 +626,7 @@ int evaluate(int argc, char ** argv) {
// Map out base path of the file
char path[_MAX_PATH];
char baseURI[(_MAX_PATH * 2) + 10];
- _getcwd(path, _MAX_PATH);
+ getcwd(path, _MAX_PATH);
strcpy(baseURI, "file:///");
Modified: santuario/trunk/c/src/tools/templatesign/templatesign.cpp
URL: http://svn.apache.org/viewvc/santuario/trunk/c/src/tools/templatesign/templatesign.cpp?rev=1002906&r1=1002905&r2=1002906&view=diff
==============================================================================
--- santuario/trunk/c/src/tools/templatesign/templatesign.cpp (original)
+++ santuario/trunk/c/src/tools/templatesign/templatesign.cpp Thu Sep 30 00:15:59 2010
@@ -1168,7 +1168,7 @@ int main(int argc, char **argv) {
char * filename=argv[argc-1];
char path[_MAX_PATH];
char baseURI[(_MAX_PATH * 2) + 10];
- _getcwd(path, _MAX_PATH);
+ getcwd(path, _MAX_PATH);
strcpy(baseURI, "file:///");
Modified: santuario/trunk/c/src/tools/txfmout/txfmout.cpp
URL: http://svn.apache.org/viewvc/santuario/trunk/c/src/tools/txfmout/txfmout.cpp?rev=1002906&r1=1002905&r2=1002906&view=diff
==============================================================================
--- santuario/trunk/c/src/tools/txfmout/txfmout.cpp (original)
+++ santuario/trunk/c/src/tools/txfmout/txfmout.cpp Thu Sep 30 00:15:59 2010
@@ -171,7 +171,7 @@ outputter::~outputter() {
void outputter::setFilename(const char * name) {
- m_name = _strdup(name);
+ m_name = strdup(name);
m_cout = false;
}
@@ -501,7 +501,7 @@ int main(int argc, char **argv) {
// Map out base path of the file
char path[_MAX_PATH];
char baseURI[(_MAX_PATH * 2) + 10];
- _getcwd(path, _MAX_PATH);
+ getcwd(path, _MAX_PATH);
strcpy(baseURI, "file:///");
strcat(baseURI, path);
Modified: santuario/trunk/c/src/tools/xtest/xtest.cpp
URL: http://svn.apache.org/viewvc/santuario/trunk/c/src/tools/xtest/xtest.cpp?rev=1002906&r1=1002905&r2=1002906&view=diff
==============================================================================
--- santuario/trunk/c/src/tools/xtest/xtest.cpp (original)
+++ santuario/trunk/c/src/tools/xtest/xtest.cpp Thu Sep 30 00:15:59 2010
@@ -1118,9 +1118,6 @@ void unitTestRSA(DOMImplementation * imp
#if defined (XSEC_HAVE_NSS)
if (g_useNSS) {
- // Use the internal key
- NSSCryptoProvider *cp = (NSSCryptoProvider *) (XSECPlatformUtils::g_cryptoProvider);
-
// Heavily based on Mozilla example code
SECKEYPrivateKey *prvKey = 0;
SECKEYPublicKey *pubKey = 0;
@@ -2069,9 +2066,6 @@ void unitTestEncrypt(DOMImplementation *
#if defined (XSEC_HAVE_NSS)
if (g_useNSS) {
- // Use the internal key
- NSSCryptoProvider *cp = (NSSCryptoProvider *) (XSECPlatformUtils::g_cryptoProvider);
-
// Heavily based on Mozilla example code
SECKEYPrivateKey *prvKey = 0;
SECKEYPublicKey *pubKey = 0;