You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by bl...@apache.org on 2004/03/07 04:20:52 UTC

cvs commit: xml-security/c/src/xenc/impl XENCAlgorithmHandlerDefault.cpp XENCCipherImpl.cpp

blautenb    2004/03/06 19:20:52

  Modified:    c/src/canon XSECC14n20010315.cpp
               c/src/dsig DSIGKeyInfoSPKIData.cpp DSIGKeyInfoX509.cpp
                        DSIGReference.cpp DSIGSignature.cpp
                        DSIGTransformXPathFilter.cpp DSIGXPathHere.hpp
               c/src/enc XSECKeyInfoResolverDefault.cpp
               c/src/enc/WinCAPI WinCAPICryptoProvider.hpp
                        WinCAPICryptoSymmetricKey.cpp
               c/src/framework XSECEnv.cpp XSECW32Config.hpp
               c/src/tools/checksig InteropResolver.cpp checksig.cpp
               c/src/tools/cipher XencInteropResolver.cpp
               c/src/tools/siginf siginf.cpp
               c/src/tools/templatesign templatesign.cpp
               c/src/tools/threadTest threadtest.cpp
               c/src/tools/txfmout txfmout.cpp
               c/src/tools/xtest xtest.cpp
               c/src/transformers TXFMXPath.cpp TXFMXPathFilter.cpp
                        TXFMXSL.cpp
               c/src/utils XSECSafeBuffer.cpp
               c/src/utils/winutils XSECBinHTTPURIInputStream.cpp
               c/src/xenc/impl XENCAlgorithmHandlerDefault.cpp
                        XENCCipherImpl.cpp
  Log:
  Various code clean ups to support a clean build VC7
  
  Revision  Changes    Path
  1.15      +4 -4      xml-security/c/src/canon/XSECC14n20010315.cpp
  
  Index: XSECC14n20010315.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/canon/XSECC14n20010315.cpp,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- XSECC14n20010315.cpp	8 Feb 2004 10:20:22 -0000	1.14
  +++ XSECC14n20010315.cpp	7 Mar 2004 03:20:51 -0000	1.15
  @@ -192,7 +192,7 @@
   
   bool XSECC14n20010315::inNonExclNSList(safeBuffer &ns) {
   
  -	int size = m_exclNSList.size();
  +	int size = (int) m_exclNSList.size();
   
   	for (int i = 0; i < size; ++i) {
   
  @@ -342,7 +342,7 @@
   		delete mp_formatter;
   
   	// Clear out the exclusive namespace list
  -	int size = m_exclNSList.size();
  +	int size = (int) m_exclNSList.size();
   
   	for (int i = 0; i < size; ++i) {
   
  @@ -446,7 +446,7 @@
   	XercesDocumentWrapper *theWrapper = theParserLiaison.mapDocumentToWrapper(theDoc);
   	XercesWrapperNavigator theWrapperNavigator(theWrapper);
   
  -	int size = theResult.getLength();
  +	int size = (int) theResult.getLength();
   	const DOMNode *item;
   	
   	for (int i = 0; i < size; ++ i) {
  
  
  
  1.8       +2 -2      xml-security/c/src/dsig/DSIGKeyInfoSPKIData.cpp
  
  Index: DSIGKeyInfoSPKIData.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/dsig/DSIGKeyInfoSPKIData.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DSIGKeyInfoSPKIData.cpp	8 Feb 2004 10:20:51 -0000	1.7
  +++ DSIGKeyInfoSPKIData.cpp	7 Mar 2004 03:20:51 -0000	1.8
  @@ -128,7 +128,7 @@
   
   unsigned int DSIGKeyInfoSPKIData::getSexpSize(void) {
   
  -	return m_sexpList.size();
  +	return (unsigned int) m_sexpList.size();
   
   }
   
  
  
  
  1.14      +4 -4      xml-security/c/src/dsig/DSIGKeyInfoX509.cpp
  
  Index: DSIGKeyInfoX509.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/dsig/DSIGKeyInfoX509.cpp,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- DSIGKeyInfoX509.cpp	21 Feb 2004 08:26:53 -0000	1.13
  +++ DSIGKeyInfoX509.cpp	7 Mar 2004 03:20:51 -0000	1.14
  @@ -161,7 +161,7 @@
   					h->mp_cryptoX509 = XSECPlatformUtils::g_cryptoProvider->X509();
   					char * charX509 = XMLString::transcode(h->mp_encodedX509);
   					ArrayJanitor<char> j_charX509(charX509);
  -					h->mp_cryptoX509->loadX509Base64Bin(charX509, strlen(charX509));
  +					h->mp_cryptoX509->loadX509Base64Bin(charX509, (int) strlen(charX509));
   
   				}
   			}
  @@ -317,7 +317,7 @@
   
   int DSIGKeyInfoX509::getCertificateListSize(void) {
   
  -	return m_X509List.size();
  +	return (int) m_X509List.size();
   
   }
   
  @@ -557,6 +557,6 @@
   	h->mp_cryptoX509 = XSECPlatformUtils::g_cryptoProvider->X509();
   	char * charX509 = XMLString::transcode(h->mp_encodedX509);
   	ArrayJanitor<char> j_charX509(charX509);
  -	h->mp_cryptoX509->loadX509Base64Bin(charX509, strlen(charX509));
  +	h->mp_cryptoX509->loadX509Base64Bin(charX509, (unsigned int) strlen(charX509));
   	
   }
  
  
  
  1.22      +3 -3      xml-security/c/src/dsig/DSIGReference.cpp
  
  Index: DSIGReference.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/dsig/DSIGReference.cpp,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- DSIGReference.cpp	29 Feb 2004 06:39:44 -0000	1.21
  +++ DSIGReference.cpp	7 Mar 2004 03:20:51 -0000	1.22
  @@ -835,7 +835,7 @@
   // Run through a list of hashes and checkHash for each one
   
   	DSIGReference * r;
  -	int i = lst->getSize();
  +	int i = (int) lst->getSize();
   	safeBuffer errStr;
   	errStr.sbXMLChIn(DSIGConstants::s_unicodeStrEmpty);
   
  @@ -877,7 +877,7 @@
   	DSIGReference * r;
   	bool res = true;
   
  -	int size = lst->getSize();
  +	int size = (int) lst->getSize();
   
   	for (int i = 0; i < size; ++i) {
   
  
  
  
  1.32      +5 -5      xml-security/c/src/dsig/DSIGSignature.cpp
  
  Index: DSIGSignature.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/dsig/DSIGSignature.cpp,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- DSIGSignature.cpp	29 Feb 2004 06:39:44 -0000	1.31
  +++ DSIGSignature.cpp	7 Mar 2004 03:20:51 -0000	1.32
  @@ -92,7 +92,7 @@
   	b64Str[1023] = '\0';	// Just in case
   
   	b64->decodeInit();
  -	outputLen = b64->decode((unsigned char *) b64Str, strlen((char *) b64Str), outputStr, 1024);
  +	outputLen = b64->decode((unsigned char *) b64Str, (unsigned int) strlen((char *) b64Str), outputStr, 1024);
   	outputLen += b64->decodeFinish(&outputStr[outputLen], 1024 - outputLen);
   
   	// Compare
  @@ -339,13 +339,13 @@
   
   int DSIGSignature::getObjectLength(void) {
   
  -	return m_objects.size();
  +	return (unsigned int) m_objects.size();
   
   }
   
   DSIGObject * DSIGSignature::getObjectItem(int i) {
   
  -	if ( i < 0 || i >= m_objects.size()) {
  +	if ( i < 0 || i >= ((int) m_objects.size())) {
   		throw XSECException(XSECException::ObjectError,
   			"DSIGSignature::getObjectItem - index out of range");
   	}
  @@ -435,7 +435,7 @@
   	}
   
   	// Delete any object items
  -	for (int i = 0; i < m_objects.size(); ++i) {
  +	for (int i = 0; i < ((int) m_objects.size()); ++i) {
   		delete (m_objects[i]);
   	}
   
  
  
  
  1.8       +2 -2      xml-security/c/src/dsig/DSIGTransformXPathFilter.cpp
  
  Index: DSIGTransformXPathFilter.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/dsig/DSIGTransformXPathFilter.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DSIGTransformXPathFilter.cpp	8 Feb 2004 10:20:52 -0000	1.7
  +++ DSIGTransformXPathFilter.cpp	7 Mar 2004 03:20:51 -0000	1.8
  @@ -200,7 +200,7 @@
   
   unsigned int DSIGTransformXPathFilter::getExprNum(void) {
   
  -	return m_exprs.size();
  +	return (unsigned int) m_exprs.size();
   
   }
   
  
  
  
  1.8       +9 -1      xml-security/c/src/dsig/DSIGXPathHere.hpp
  
  Index: DSIGXPathHere.hpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/dsig/DSIGXPathHere.hpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DSIGXPathHere.hpp	8 Feb 2004 10:20:52 -0000	1.7
  +++ DSIGXPathHere.hpp	7 Mar 2004 03:20:51 -0000	1.8
  @@ -29,6 +29,10 @@
   
   #ifndef XSEC_NO_XALAN
   
  +#if defined(_MSC_VER)
  +#	pragma warning(disable: 4267)
  +#endif
  +
   #include <xalanc/Include/PlatformDefinitions.hpp>
   #include <xalanc/XalanTransformer/XalanTransformer.hpp>
   #include <xalanc/XPath/XObjectFactory.hpp>
  @@ -39,6 +43,10 @@
   #include <xalanc/XPath/XObjectTypeCallback.hpp>
   #include <xalanc/XPath/MutableNodeRefList.hpp>
   #include <xalanc/XPath/NodeRefListBase.hpp>
  +
  +#if defined(_MSC_VER)
  +#	pragma warning(default: 4267)
  +#endif
   
   // Namespace usage
   
  
  
  
  1.9       +8 -8      xml-security/c/src/enc/XSECKeyInfoResolverDefault.cpp
  
  Index: XSECKeyInfoResolverDefault.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/enc/XSECKeyInfoResolverDefault.cpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XSECKeyInfoResolverDefault.cpp	8 Feb 2004 10:23:57 -0000	1.8
  +++ XSECKeyInfoResolverDefault.cpp	7 Mar 2004 03:20:51 -0000	1.9
  @@ -85,7 +85,7 @@
   				safeBuffer transX509;
   
   				transX509 << (*mp_formatter << x509Str);
  -				x509->loadX509Base64Bin(transX509.rawCharBuffer(), strlen(transX509.rawCharBuffer()));
  +				x509->loadX509Base64Bin(transX509.rawCharBuffer(), (unsigned int) strlen(transX509.rawCharBuffer()));
   				ret = x509->clonePublicKey();
   			}
   
  @@ -104,13 +104,13 @@
   			safeBuffer value;
   
   			value << (*mp_formatter << ((DSIGKeyInfoValue *) lst->item(i))->getDSAP());
  -			dsa->loadPBase64BigNums(value.rawCharBuffer(), strlen(value.rawCharBuffer()));
  +			dsa->loadPBase64BigNums(value.rawCharBuffer(), (unsigned int) strlen(value.rawCharBuffer()));
   			value << (*mp_formatter << ((DSIGKeyInfoValue *) lst->item(i))->getDSAQ());
  -			dsa->loadQBase64BigNums(value.rawCharBuffer(), strlen(value.rawCharBuffer()));
  +			dsa->loadQBase64BigNums(value.rawCharBuffer(), (unsigned int) strlen(value.rawCharBuffer()));
   			value << (*mp_formatter << ((DSIGKeyInfoValue *) lst->item(i))->getDSAG());
  -			dsa->loadGBase64BigNums(value.rawCharBuffer(), strlen(value.rawCharBuffer()));
  +			dsa->loadGBase64BigNums(value.rawCharBuffer(), (unsigned int) strlen(value.rawCharBuffer()));
   			value << (*mp_formatter << ((DSIGKeyInfoValue *) lst->item(i))->getDSAY());
  -			dsa->loadYBase64BigNums(value.rawCharBuffer(), strlen(value.rawCharBuffer()));
  +			dsa->loadYBase64BigNums(value.rawCharBuffer(), (unsigned int) strlen(value.rawCharBuffer()));
   
   			j_dsa.release();
   			return dsa;
  @@ -126,9 +126,9 @@
   			safeBuffer value;
   
   			value << (*mp_formatter << ((DSIGKeyInfoValue *) lst->item(i))->getRSAModulus());
  -			rsa->loadPublicModulusBase64BigNums(value.rawCharBuffer(), strlen(value.rawCharBuffer()));
  +			rsa->loadPublicModulusBase64BigNums(value.rawCharBuffer(), (unsigned int) strlen(value.rawCharBuffer()));
   			value << (*mp_formatter << ((DSIGKeyInfoValue *) lst->item(i))->getRSAExponent());
  -			rsa->loadPublicExponentBase64BigNums(value.rawCharBuffer(), strlen(value.rawCharBuffer()));
  +			rsa->loadPublicExponentBase64BigNums(value.rawCharBuffer(), (unsigned int) strlen(value.rawCharBuffer()));
   
   			j_rsa.release();
   			return rsa;
  
  
  
  1.13      +5 -1      xml-security/c/src/enc/WinCAPI/WinCAPICryptoProvider.hpp
  
  Index: WinCAPICryptoProvider.hpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/enc/WinCAPI/WinCAPICryptoProvider.hpp,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- WinCAPICryptoProvider.hpp	18 Feb 2004 10:46:52 -0000	1.12
  +++ WinCAPICryptoProvider.hpp	7 Mar 2004 03:20:51 -0000	1.13
  @@ -31,8 +31,12 @@
   #include <xsec/framework/XSECDefs.hpp>
   #include <xsec/enc/XSECCryptoProvider.hpp>
   
  +#if defined (_WIN32_WINNT)
  +#	undef _WIN32_WINNT
  +#endif
   #define _WIN32_WINNT 0x0400
   #include <wincrypt.h>
  +
   
   // For older versions of wincrypt.h
   
  
  
  
  1.7       +4 -3      xml-security/c/src/enc/WinCAPI/WinCAPICryptoSymmetricKey.cpp
  
  Index: WinCAPICryptoSymmetricKey.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/enc/WinCAPI/WinCAPICryptoSymmetricKey.cpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- WinCAPICryptoSymmetricKey.cpp	8 Feb 2004 10:23:33 -0000	1.6
  +++ WinCAPICryptoSymmetricKey.cpp	7 Mar 2004 03:20:51 -0000	1.7
  @@ -346,7 +346,7 @@
   
   	// Set up the context according to the required cipher type
   
  -	const unsigned char * usedIV;
  +	const unsigned char * usedIV = NULL;
   	unsigned char genIV[256];
   	DWORD cryptMode;
   
  @@ -437,7 +437,8 @@
   
   	}
   
  -	memcpy(m_lastBlock, usedIV, m_ivSize);
  +	if (usedIV != NULL && m_ivSize > 0)
  +		memcpy(m_lastBlock, usedIV, m_ivSize);
   
   
   }
  
  
  
  1.8       +4 -4      xml-security/c/src/framework/XSECEnv.cpp
  
  Index: XSECEnv.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/framework/XSECEnv.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- XSECEnv.cpp	29 Feb 2004 06:39:45 -0000	1.7
  +++ XSECEnv.cpp	7 Mar 2004 03:20:51 -0000	1.8
  @@ -234,7 +234,7 @@
   
   bool XSECEnv::isRegisteredIdAttributeName(const XMLCh * name) const {
   
  -	int sz = m_idAttributeNameList.size();
  +	int sz = (int) m_idAttributeNameList.size();
   
   	for (int i = 0; i < sz; ++i) {
   		if (strEquals(m_idAttributeNameList[i], name))
  @@ -273,13 +273,13 @@
   
   int XSECEnv::getIdAttributeNameListSize() const {
   
  -	return m_idAttributeNameList.size();
  +	return (int) m_idAttributeNameList.size();
   
   }
   
   const XMLCh * XSECEnv::getIdAttributeNameListItem(int index) const {
   
  -	if (index >= 0 && index < m_idAttributeNameList.size())
  +	if (index >= 0 && index < (int) m_idAttributeNameList.size())
   		return m_idAttributeNameList[index];
   
   	return NULL;
  
  
  
  1.18      +2 -2      xml-security/c/src/framework/XSECW32Config.hpp
  
  Index: XSECW32Config.hpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/framework/XSECW32Config.hpp,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- XSECW32Config.hpp	29 Feb 2004 10:45:04 -0000	1.17
  +++ XSECW32Config.hpp	7 Mar 2004 03:20:51 -0000	1.18
  @@ -68,7 +68,7 @@
    * Activate this #define if Xalan is not required (or desired)
    */
   
  -/* #define XSEC_NO_XALAN */
  +#define XSEC_NO_XALAN
   
   /*
    * Define presence of cryptographic providers
  
  
  
  1.10      +10 -10    xml-security/c/src/tools/checksig/InteropResolver.cpp
  
  Index: InteropResolver.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/tools/checksig/InteropResolver.cpp,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- InteropResolver.cpp	21 Feb 2004 08:26:54 -0000	1.9
  +++ InteropResolver.cpp	7 Mar 2004 03:20:51 -0000	1.10
  @@ -74,7 +74,7 @@
   
   void reverseSlash(safeBuffer &path) {
   
  -	for (int i = 0; i < strlen(path.rawCharBuffer()); ++i) {
  +	for (int i = 0; i < (int) strlen(path.rawCharBuffer()); ++i) {
   
   		if (path[i] == '/')
   			path[i] = '\\';
  @@ -108,7 +108,7 @@
   
   		reverseSlash(path);
   
  -		m_handle = _findfirst(path.rawCharBuffer(), &m_finder);
  +		m_handle = (long) _findfirst(path.rawCharBuffer(), &m_finder);
   		res = m_handle;
   #else
   		if (glob(path.rawCharBuffer(), 0, NULL, &m_globbuf) != 0)
  @@ -297,7 +297,7 @@
   	// Check if the parameters in x match the required certificate
   
   
  -	int sz = lst->getSize();
  +	int sz = (int) lst->getSize();
   	DSIGKeyInfo* k;
   	
   	for (int i = 0; i < sz; ++i) {
  @@ -342,7 +342,7 @@
   			if (ski != NULL) {
   
   				char * cski = XMLString::transcode(ski);
  -				int clen = strlen(cski);
  +				int clen = (int) strlen(cski);
   				unsigned char * xski = new unsigned char[clen];
   				ArrayJanitor<char> j_cski(cski);
   				ArrayJanitor <unsigned char> j_xski(xski);
  @@ -465,7 +465,7 @@
   	const XMLCh * b64cert = NULL;
   	const XMLCh * b64crl = NULL;
   
  -	int lstSize = lst->getSize();
  +	int lstSize = (int) lst->getSize();
   
   	for (int i = 0; i < lstSize; ++i) {
   
  @@ -552,8 +552,8 @@
   		X509 *x;
   
   		b64.decodeInit();
  -		x509bufLen = b64.decode((unsigned char *) transb64cert, strlen(transb64cert), x509buf, strlen(transb64cert));
  -		x509bufLen += b64.decodeFinish(&x509buf[x509bufLen], strlen(transb64cert) - x509bufLen);
  +		x509bufLen = b64.decode((unsigned char *) transb64cert, (unsigned int) strlen(transb64cert), x509buf, (unsigned int) strlen(transb64cert));
  +		x509bufLen += b64.decodeFinish(&x509buf[x509bufLen], (unsigned int) strlen(transb64cert) - x509bufLen);
   
   		if (x509bufLen > 0) {
   			x =  d2i_X509(NULL, &x509buf, x509bufLen);
  @@ -575,8 +575,8 @@
   		X509_CRL * c;
   
   		b64.decodeInit();
  -		crlbufLen = b64.decode((unsigned char*) transb64crl, strlen(transb64crl), crlbuf, strlen(transb64crl));
  -		crlbufLen += b64.decodeFinish(&crlbuf[crlbufLen], strlen(transb64crl) - crlbufLen);
  +		crlbufLen = b64.decode((unsigned char*) transb64crl, (unsigned int) strlen(transb64crl), crlbuf, (unsigned int) strlen(transb64crl));
  +		crlbufLen += b64.decodeFinish(&crlbuf[crlbufLen], (unsigned int) strlen(transb64crl) - crlbufLen);
   
   		if (crlbufLen > 0) {
   			c =  d2i_X509_CRL(NULL, &crlbuf, crlbufLen);
  
  
  
  1.29      +3 -3      xml-security/c/src/tools/checksig/checksig.cpp
  
  Index: checksig.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/tools/checksig/checksig.cpp,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- checksig.cpp	21 Feb 2004 08:26:54 -0000	1.28
  +++ checksig.cpp	7 Mar 2004 03:20:51 -0000	1.29
  @@ -244,7 +244,7 @@
   				fResult = CryptHashData(
   					h,
   					(unsigned char *) argv[paramCount],
  -					strlen(argv[paramCount]),
  +					(DWORD) strlen(argv[paramCount]),
   					0);
   				
   				if (fResult == 0) {
  @@ -466,7 +466,7 @@
   			hmacKey = new WinCAPICryptoKeyHMAC(0);
   #	endif
   #endif
  -			hmacKey->setKey((unsigned char *) hmacKeyStr, strlen(hmacKeyStr));
  +			hmacKey->setKey((unsigned char *) hmacKeyStr, (unsigned int) strlen(hmacKeyStr));
   			sig->setSigningKey(hmacKey);
   
   		}
  
  
  
  1.5       +7 -7      xml-security/c/src/tools/cipher/XencInteropResolver.cpp
  
  Index: XencInteropResolver.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/tools/cipher/XencInteropResolver.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XencInteropResolver.cpp	21 Feb 2004 08:26:54 -0000	1.4
  +++ XencInteropResolver.cpp	7 Mar 2004 03:20:51 -0000	1.5
  @@ -267,7 +267,7 @@
   
   void reverseSlash(safeBuffer &path) {
   
  -	for (int i = 0; i < strlen(path.rawCharBuffer()); ++i) {
  +	for (int i = 0; i < (int) strlen(path.rawCharBuffer()); ++i) {
   
   		if (path[i] == '/')
   			path[i] = '\\';
  @@ -333,7 +333,7 @@
   
   XSECCryptoKey * XencInteropResolver::resolveKey(DSIGKeyInfoList * lst) {
   
  -	int lstSize = lst->getSize();
  +	int lstSize = (int) lst->getSize();
   
   	for (int i = 0; i < lstSize; ++i) {
   
  @@ -351,7 +351,7 @@
   				XSECCryptoSymmetricKey * k = 
   					XSECPlatformUtils::g_cryptoProvider->keySymmetric(XSECCryptoSymmetricKey::KEY_3DES_192);
   				try {
  -					k->setKey((unsigned char *) s_bobKey, strlen(s_bobKey));
  +					k->setKey((unsigned char *) s_bobKey, (unsigned int) strlen(s_bobKey));
   				} catch (...) {
   					delete k;
   					throw;
  @@ -362,7 +362,7 @@
   				XSECCryptoSymmetricKey * k = 
   					XSECPlatformUtils::g_cryptoProvider->keySymmetric(XSECCryptoSymmetricKey::KEY_AES_128);
   				try {
  -					k->setKey((unsigned char *) s_jobKey, strlen(s_jobKey));
  +					k->setKey((unsigned char *) s_jobKey, (unsigned int) strlen(s_jobKey));
   				} catch(...) {
   					delete k;
   					throw;
  @@ -373,7 +373,7 @@
   				XSECCryptoSymmetricKey * k = 
   					XSECPlatformUtils::g_cryptoProvider->keySymmetric(XSECCryptoSymmetricKey::KEY_AES_192);
   				try {
  -					k->setKey((unsigned char *) s_jebKey, strlen(s_jebKey));
  +					k->setKey((unsigned char *) s_jebKey, (unsigned int) strlen(s_jebKey));
   				} catch(...) {
   					delete k;
   					throw;
  @@ -384,7 +384,7 @@
   				XSECCryptoSymmetricKey * k = 
   					XSECPlatformUtils::g_cryptoProvider->keySymmetric(XSECCryptoSymmetricKey::KEY_AES_256);
   				try {
  -					k->setKey((unsigned char *) s_jedKey, strlen(s_jedKey));
  +					k->setKey((unsigned char *) s_jedKey, (unsigned int) strlen(s_jedKey));
   				} catch(...) {
   					delete k;
   					throw;
  
  
  
  1.10      +4 -4      xml-security/c/src/tools/siginf/siginf.cpp
  
  Index: siginf.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/tools/siginf/siginf.cpp,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- siginf.cpp	21 Feb 2004 08:26:54 -0000	1.9
  +++ siginf.cpp	7 Mar 2004 03:20:51 -0000	1.10
  @@ -275,7 +275,7 @@
   		
   void outputReferences(DSIGReferenceList *rl, int level) {
   
  -	int s = rl->getSize();
  +	int s = (int) rl->getSize();
   
   	for (int i = 0; i < s; ++i) {
   	
  @@ -292,7 +292,7 @@
   		DSIGTransformList * tl = rl->item(i)->getTransforms();
   		if (tl != NULL) {
   
  -			int tlSize = tl->getSize();
  +			int tlSize = (int) tl->getSize();
   			for (int j = 0 ; j < tlSize; ++j) {
   
   				levelSet(level+1);
  @@ -604,7 +604,7 @@
   
   	if ( _CrtMemDifference( &s3, &s1, &s2 ) && s3.lCounts[1] > 1) {
   
  -		std::cerr << "Total count = " << s3.lTotalCount << endl;
  +		std::cerr << "Total count = " << (unsigned int) s3.lTotalCount << endl;
   
   		// Send all reports to STDOUT
   		_CrtSetReportMode( _CRT_WARN, _CRTDBG_MODE_FILE );
  
  
  
  1.20      +6 -6      xml-security/c/src/tools/templatesign/templatesign.cpp
  
  Index: templatesign.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/tools/templatesign/templatesign.cpp,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- templatesign.cpp	21 Feb 2004 08:26:54 -0000	1.19
  +++ templatesign.cpp	7 Mar 2004 03:20:51 -0000	1.20
  @@ -781,7 +781,7 @@
   			WinCAPICryptoKeyHMAC * hmacKey = new WinCAPICryptoKeyHMAC(0);
   #	endif
   #endif
  -			hmacKey->setKey((unsigned char *) argv[paramCount + 1], strlen(argv[paramCount + 1]));
  +			hmacKey->setKey((unsigned char *) argv[paramCount + 1], (unsigned int) strlen(argv[paramCount + 1]));
   			key = hmacKey;
   			paramCount += 2;
   
  @@ -905,7 +905,7 @@
   			fResult = CryptHashData(
   				h,
   				(unsigned char *) argv[paramCount],
  -				strlen(argv[paramCount]),
  +				(DWORD) strlen(argv[paramCount]),
   				0);
   			
   			if (fResult == 0) {
  @@ -1010,7 +1010,7 @@
   					exit(1);
   			}
   
  -			cp = new WinCAPICryptoProvider(win32DSSCSP, win32RSACSP);
  +			cp = new WinCAPICryptoProvider();
   			XSECPlatformUtils::SetCryptoProvider(cp);
   
   			HCRYPTKEY k;
  @@ -1024,7 +1024,7 @@
   				exit(1);
   			};
   
  -			winKeyRSA = new WinCAPICryptoKeyRSA(cp, k, true);
  +			winKeyRSA = new WinCAPICryptoKeyRSA(win32RSACSP, k);
   			key = winKeyRSA;
   			paramCount += 2;
   
  @@ -1220,7 +1220,7 @@
   			int i;
   			// Have some certificates - see if there is already an X509 list
   			DSIGKeyInfoList * kiList = sig->getKeyInfoList();
  -			int kiSize = kiList->getSize();
  +			int kiSize = (int) kiList->getSize();
   
   			for (i = 0; i < kiSize; ++i) {
   
  
  
  
  1.8       +7 -6      xml-security/c/src/tools/threadTest/threadtest.cpp
  
  Index: threadtest.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/tools/threadTest/threadtest.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- threadtest.cpp	8 Feb 2004 10:24:59 -0000	1.7
  +++ threadtest.cpp	7 Mar 2004 03:20:52 -0000	1.8
  @@ -249,7 +249,7 @@
   #else
   		WinCAPICryptoKeyHMAC * hmacKey = new WinCAPICryptoKeyHMAC(0);
   #endif
  -		hmacKey->setKey((unsigned char *) "secret", strlen("secret"));
  +		hmacKey->setKey((unsigned char *) "secret", (unsigned int) strlen("secret"));
   		sig->setSigningKey(hmacKey);
   		sig->sign();
   
  @@ -331,7 +331,8 @@
   
   		// Now parse and validate the signature
   		MemBufInputSource* memIS = new MemBufInputSource ((const XMLByte*) buf, 
  -															strlen(buf), "XSECMem");
  +															(unsigned int) strlen(buf), 
  +															"XSECMem");
   
   		parser->parse(*memIS);
   
  @@ -363,7 +364,7 @@
   		WinCAPICryptoKeyHMAC *hmacKey = new WinCAPICryptoKeyHMAC(0);
   #endif
   
  -		hmacKey->setKey((unsigned char *) secretKey, strlen(secretKey));
  +		hmacKey->setKey((unsigned char *) secretKey, (unsigned int) strlen(secretKey));
   		sig->setSigningKey(hmacKey);
   		sig->load();
   		if (sig->verify() != true) {
  @@ -470,7 +471,7 @@
   		cerr << "Ops/Sec: " << total - lastVerifyTotal << endl << endl;
   		lastVerifyTotal = total;
   		cerr << "Total Errors : " << g_errors << endl;
  -		cerr << "Buffers in Queue : " << g_toVerifyQueue.size() << endl;
  +		cerr << "Buffers in Queue : " << (unsigned int) g_toVerifyQueue.size() << endl;
   		
   		// Go to sleep for a second
   
  @@ -574,7 +575,7 @@
   
   	hThreads.push_back(h2Thread);
   
  -	WaitForMultipleObjects(hThreads.size(), &hThreads[0], TRUE, INFINITE);
  +	WaitForMultipleObjects((DWORD) hThreads.size(), &hThreads[0], TRUE, INFINITE);
   
   	for (i = 0; i < nThreads; ++i)
   	{
  
  
  
  1.15      +2 -2      xml-security/c/src/tools/txfmout/txfmout.cpp
  
  Index: txfmout.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/tools/txfmout/txfmout.cpp,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- txfmout.cpp	21 Feb 2004 08:26:54 -0000	1.14
  +++ txfmout.cpp	7 Mar 2004 03:20:52 -0000	1.15
  @@ -297,7 +297,7 @@
   
   	lstSz = 0;
   
  -	lstSz = lst->getSize();
  +	lstSz = (int) lst->getSize();
   
   	for (i = 0; i < lstSz; ++i) {
   
  
  
  
  1.43      +14 -7     xml-security/c/src/tools/xtest/xtest.cpp
  
  Index: xtest.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/tools/xtest/xtest.cpp,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- xtest.cpp	29 Feb 2004 06:39:45 -0000	1.42
  +++ xtest.cpp	7 Mar 2004 03:20:52 -0000	1.43
  @@ -332,7 +332,7 @@
   #	endif
   #endif
   
  -	hmacKey->setKey((unsigned char *) str, strlen((char *)str));
  +	hmacKey->setKey((unsigned char *) str, (unsigned int) strlen((char *)str));
   
   	return hmacKey;
   
  @@ -722,7 +722,11 @@
   
   	// Test an enveloping signature
   	unitTestEnvelopingSignature(impl);
  +#ifndef XSEC_NO_XALAN
   	unitTestBase64NodeSignature(impl);
  +#else
  +	cerr << "Skipping base64 node test (Requires XPath)" << endl;
  +#endif
   }
   
   // --------------------------------------------------------------------------------
  @@ -1001,7 +1005,7 @@
   		 */
   
   		DSIGKeyInfoList * kil = sig->getKeyInfoList();
  -		int nki = kil->getSize();
  +		int nki = (int) kil->getSize();
   
   		cerr << "Checking Distinguished name is decoded correctly ... ";
   		for (i = 0; i < nki; ++i) {
  @@ -1334,7 +1338,7 @@
   		cipher->setKEK(k);
   
   		XENCEncryptedKey * encryptedKey;
  -		encryptedKey = cipher->encryptKey(toEncryptStr, strlen((char *) toEncryptStr), em);
  +		encryptedKey = cipher->encryptKey(toEncryptStr, (unsigned int) strlen((char *) toEncryptStr), em);
   		Janitor<XENCEncryptedKey> j_encryptedKey(encryptedKey);
   
   		rootElem->appendChild(encryptedKey->getElement());
  @@ -1427,7 +1431,7 @@
   
   		cerr << "RSA OAEP key wrap + params... ";
   		k = new OpenSSLCryptoKeyRSA(pk);
  -		k->setOAEPparams(s_tstOAEPparams, strlen((char *) s_tstOAEPparams));
  +		k->setOAEPparams(s_tstOAEPparams, (unsigned int) strlen((char *) s_tstOAEPparams));
   
   		unitTestKeyEncrypt(impl, k, ENCRYPT_RSA_OAEP_MGFP1);
   
  @@ -1533,7 +1537,7 @@
   		cerr << "Unit testing 3DES CBC encryption" << endl;
   		unitTestElementContentEncrypt(impl, ks->clone(), ENCRYPT_3DES_CBC, false);
   		unitTestElementContentEncrypt(impl, ks, ENCRYPT_3DES_CBC, true);
  -
  +#ifndef XSEC_NO_XALAN
   		if (g_haveAES) {
   			cerr << "Unit testing CipherReference creation and decryption" << endl;
   			unitTestCipherReference(impl);
  @@ -1541,6 +1545,9 @@
   		else {
   			cerr << "Skipped Cipher Reference Test (uses AES)" << endl;
   		}
  +#else
  +		cerr << "Skipped Cipher Reference Test (requires XPath)" << endl;
  +#endif
   
   	}
   	catch (XSECCryptoException &e)
  @@ -1716,7 +1723,7 @@
   		}
   
   		DSIGKeyInfoList * kil = encryptedData->getKeyInfoList();
  -		int nki = kil->getSize();
  +		int nki = (int) kil->getSize();
   		bool foundNameOK = false;
   
   		int i;
  
  
  
  1.13      +10 -2     xml-security/c/src/transformers/TXFMXPath.cpp
  
  Index: TXFMXPath.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/transformers/TXFMXPath.cpp,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- TXFMXPath.cpp	29 Feb 2004 10:17:04 -0000	1.12
  +++ TXFMXPath.cpp	7 Mar 2004 03:20:52 -0000	1.13
  @@ -32,9 +32,17 @@
   
   #ifndef XSEC_NO_XALAN
   
  +#if defined(_MSC_VER)
  +#	pragma warning(disable: 4267)
  +#endif
  +
   #include <xalanc/XPath/XObjectFactoryDefault.hpp>
   #include <xalanc/XPath/XPathExecutionContextDefault.hpp>
   
  +#if defined(_MSC_VER)
  +#	pragma warning(default: 4267)
  +#endif
  +
   // Xalan namespace usage
   XALAN_USING_XALAN(XPathProcessorImpl)
   XALAN_USING_XALAN(XercesDOMSupport)
  @@ -451,7 +459,7 @@
   
   		const NodeRefListBase&	lst = xObj->nodeset();
   		
  -		int size = lst.getLength();
  +		int size = (int) lst.getLength();
   		const DOMNode *item;
   		
   		for (int i = 0; i < size; ++ i) {
  
  
  
  1.9       +10 -2     xml-security/c/src/transformers/TXFMXPathFilter.cpp
  
  Index: TXFMXPathFilter.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/transformers/TXFMXPathFilter.cpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TXFMXPathFilter.cpp	8 Feb 2004 10:25:16 -0000	1.8
  +++ TXFMXPathFilter.cpp	7 Mar 2004 03:20:52 -0000	1.9
  @@ -38,6 +38,10 @@
   
   #ifndef XSEC_NO_XALAN
   
  +#if defined(_MSC_VER)
  +#	pragma warning(disable: 4267)
  +#endif
  +
   #include <xalanc/XalanDOM/XalanDocument.hpp>
   #include <xalanc/XalanDOM/XalanDOMString.hpp>
   #include <xalanc/XercesParserLiaison/XercesDocumentWrapper.hpp>
  @@ -54,6 +58,10 @@
   #include <xalanc/XPath/XPathExecutionContextDefault.hpp>
   #include <xalanc/XSLT/XSLTResultTarget.hpp>
   
  +#if defined(_MSC_VER)
  +#	pragma warning(default: 4267)
  +#endif
  +
   // Xalan namespace usage
   XALAN_USING_XALAN(XPathProcessorImpl)
   XALAN_USING_XALAN(XalanDOMString)
  @@ -283,7 +291,7 @@
   
   		const NodeRefListBase&	lst = xObj->nodeset();
   		
  -		int size = lst.getLength();
  +		int size = (int) lst.getLength();
   		const DOMNode *item;
   		
   		XSECXPathNodeList * ret;
  
  
  
  1.10      +5 -5      xml-security/c/src/transformers/TXFMXSL.cpp
  
  Index: TXFMXSL.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/transformers/TXFMXSL.cpp,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- TXFMXSL.cpp	8 Feb 2004 10:25:16 -0000	1.9
  +++ TXFMXSL.cpp	7 Mar 2004 03:20:52 -0000	1.10
  @@ -59,8 +59,8 @@
   
   	TransformXSLOutputHolder * output = (TransformXSLOutputHolder *) data;
   
  -	output->buffer.sbMemcpyIn(output->offset, s, sz);
  -	output->offset += sz;
  +	output->buffer.sbMemcpyIn(output->offset, s, (int) sz);
  +	output->offset += (int) sz;
   	output->buffer[output->offset] = '\0';
   
   	return sz;
  @@ -154,8 +154,8 @@
   void TXFMXSL::evaluateStyleSheet(const safeBuffer &sbStyleSheet) {
   
   	// Set up iostreams for input
  -	std::istrstream	theXMLStream((char *) sbInDoc.rawBuffer(), strlen((char *) sbInDoc.rawBuffer()));
  -	std::istrstream	theXSLStream((char *) sbStyleSheet.rawBuffer(), strlen((char *) sbStyleSheet.rawBuffer()));
  +	std::istrstream	theXMLStream((char *) sbInDoc.rawBuffer(), (int) strlen((char *) sbInDoc.rawBuffer()));
  +	std::istrstream	theXSLStream((char *) sbStyleSheet.rawBuffer(), (int) strlen((char *) sbStyleSheet.rawBuffer()));
   
   	// Now resolve
   
  
  
  
  1.14      +30 -26    xml-security/c/src/utils/XSECSafeBuffer.cpp
  
  Index: XSECSafeBuffer.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/utils/XSECSafeBuffer.cpp,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- XSECSafeBuffer.cpp	21 Feb 2004 08:26:54 -0000	1.13
  +++ XSECSafeBuffer.cpp	7 Mar 2004 03:20:52 -0000	1.14
  @@ -45,6 +45,10 @@
   
   size_t safeBuffer::size_XMLCh;
   
  +#if defined (_MSC_VER)
  +#pragma warning(disable: 4311)
  +#endif
  +
   void safeBuffer::checkAndExpand(unsigned int size) {
   
   	// For a given size, check it will fit (with one byte spare) 
  @@ -118,7 +122,7 @@
   
   	// Initialise with a string
   
  -	bufferSize = (strlen(inStr) > initialSize ? (strlen(inStr) * 2) : initialSize);
  +	bufferSize = ((unsigned int) strlen(inStr) > initialSize ? (unsigned int) (strlen(inStr) * 2) : initialSize);
   	buffer = new unsigned char[bufferSize];
   	strcpy((char *) buffer, inStr);
   	mp_XMLCh = NULL;
  @@ -177,7 +181,7 @@
   void safeBuffer::sbStrcpyIn(const char * inStr) {
   
   	// Copy a string into the safe buffer
  -	checkAndExpand(strlen(inStr));
  +	checkAndExpand((unsigned int) strlen(inStr));
   	strcpy((char *) buffer, inStr);
   	m_bufferType = BUFFER_CHAR;
   
  @@ -186,7 +190,7 @@
   void safeBuffer::sbStrcpyIn(const safeBuffer & inStr) {
   
   	inStr.checkBufferType(BUFFER_CHAR);
  -	checkAndExpand(strlen((char *) inStr.buffer));
  +	checkAndExpand((unsigned int) strlen((char *) inStr.buffer));
   	strcpy((char *) buffer, (char *) inStr.buffer);
   	m_bufferType = BUFFER_CHAR;
   
  @@ -195,7 +199,7 @@
   
   void safeBuffer::sbStrncpyIn(const char * inStr, int n) {
   
  -	int len = strlen(inStr);
  +	int len = (int) strlen(inStr);
   	checkAndExpand((n < len) ? n : len);
   	strncpy((char *) buffer, inStr, n);
   	m_bufferType = BUFFER_CHAR;
  @@ -217,7 +221,7 @@
   void safeBuffer::sbStrcatIn(const char * inStr) {
   
   	checkBufferType(BUFFER_CHAR);
  -	checkAndExpand(strlen((char *) buffer) + strlen(inStr));
  +	checkAndExpand((unsigned int) (strlen((char *) buffer) + strlen(inStr)));
   	strcat((char *) buffer, inStr);
   
   }
  @@ -225,7 +229,7 @@
   void safeBuffer::sbStrcatIn(const safeBuffer & inStr) {
   
   	checkBufferType(BUFFER_CHAR);
  -	checkAndExpand(strlen((char *) buffer) + strlen((char *) inStr.buffer) + 2);
  +	checkAndExpand((unsigned int) (strlen((char *) buffer) + strlen((char *) inStr.buffer) + 2));
   	strcat((char *) buffer, (char *) inStr.buffer);
   
   }
  @@ -234,8 +238,8 @@
   
   
   	checkBufferType(BUFFER_CHAR);
  -	int len = strlen(inStr);
  -	checkAndExpand(((n < len) ? n : len) + strlen((char *) buffer) + 2);
  +	int len = (int) strlen(inStr);
  +	checkAndExpand(((n < len) ? n : len) + (unsigned int) strlen((char *) buffer) + 2);
   	strncat((char *) buffer, inStr, n);
   
   }
  @@ -259,8 +263,8 @@
   
   	checkBufferType(BUFFER_CHAR);
   	
  -	unsigned int bl = strlen((char *) buffer);
  -	unsigned int il = strlen((char *) inStr);
  +	unsigned int bl = (unsigned int) strlen((char *) buffer);
  +	unsigned int il = (unsigned int) strlen((char *) inStr);
   
   	if (offset > bl) {
   		throw XSECException(XSECException::SafeBufferError,
  @@ -340,7 +344,7 @@
   int safeBuffer::sbOffsetStrcmp(const char * inStr, unsigned int offset) const {
   
   	checkBufferType(BUFFER_CHAR);
  -	unsigned int bl = strlen((char *) buffer);
  +	unsigned int bl = (unsigned int) strlen((char *) buffer);
   
   	if (offset > bl)
   		return -1;
  @@ -352,7 +356,7 @@
   int safeBuffer::sbOffsetStrncmp(const char * inStr, unsigned int offset, int n) const {
   
   	checkBufferType(BUFFER_CHAR);
  -	unsigned int bl = strlen((char *) buffer);
  +	unsigned int bl = (unsigned int) strlen((char *) buffer);
   	if (offset > bl)
   		return -1;
   
  @@ -363,7 +367,7 @@
   int safeBuffer::sbStrstr(const char * inStr) const {
   
   	char * p;
  -	int d;
  +	long int d;
   
   	checkBufferType(BUFFER_CHAR);
   	p = strstr((char *) buffer, inStr);
  @@ -371,7 +375,7 @@
   	if (p == NULL)
   		return -1;
   
  -	d = (unsigned int) p - (unsigned int) buffer;
  +	d = (unsigned long int) p - (unsigned long int) buffer;
   
   	if (d < 0 || (unsigned int) d > bufferSize)
   		return -1;
  @@ -383,7 +387,7 @@
   int safeBuffer::sbStrstr(const XMLCh * inStr) const {
   
   	XMLCh * p;
  -	int d;
  +	long int d;
   
   	checkBufferType(BUFFER_UNICODE);
   	p = XMLString::findAny((XMLCh *) buffer, inStr);
  @@ -391,7 +395,7 @@
   	if (p == NULL)
   		return -1;
   
  -	d = ((unsigned int) ((p - (unsigned int) buffer)) / size_XMLCh);
  +	d = ((unsigned long int) ((p - (unsigned long int) buffer)) / size_XMLCh);
   
   	if (d < 0 || (unsigned int) d > bufferSize)
   		return -1;
  @@ -403,10 +407,10 @@
   int safeBuffer::sbOffsetStrstr(const char * inStr, unsigned int offset) const {
   
   	char * p;
  -	int d;
  +	long int d;
   
   	checkBufferType(BUFFER_CHAR);
  -	unsigned int bl = strlen((char *) buffer);
  +	unsigned int bl = (unsigned int) strlen((char *) buffer);
   
   	if (offset > bl)
   		return -1;
  @@ -416,7 +420,7 @@
   	if (p == NULL)
   		return -1;
   
  -	d = (unsigned int) p - (unsigned int) buffer;
  +	d = (unsigned long int) p - (unsigned long int) buffer;
   
   	if (d < 0 || (unsigned int) d > bufferSize)
   		return -1;
  @@ -439,7 +443,7 @@
   	if (m_bufferType == BUFFER_CHAR) {
   
   		unsigned int i;
  -		unsigned int l = strlen((char *) buffer);
  +		unsigned int l = (unsigned int) strlen((char *) buffer);
   
   		for (i = 0; i < l; ++i) {
   			if (buffer[i] >= 'A' && buffer[i] <= 'Z')
  @@ -564,7 +568,7 @@
   	// as a buffer that is the exact size is likely to be deleted anyway during a 
   	// concat operation
   
  -	unsigned int len = strlen(t) + 1;
  +	unsigned int len = (unsigned int) strlen(t) + 1;
   	checkAndExpand(len);
   	strcpy((char *) buffer, t);
   	m_bufferType = BUFFER_CHAR;
  @@ -585,7 +589,7 @@
   	// Copy into local buffer
   
   	unsigned int len = XMLString::stringLen(t) + 1;
  -	len *= size_XMLCh;
  +	len *= (unsigned int) size_XMLCh;
   	checkAndExpand(len);
   
   	XMLString::copyString((XMLCh *) buffer, t);
  @@ -622,7 +626,7 @@
   	checkBufferType(BUFFER_UNICODE);
   	unsigned int len = XMLString::stringLen((XMLCh *) buffer) * size_XMLCh;
   	len += XMLString::stringLen(str) * size_XMLCh;
  -	len += (2 * size_XMLCh);
  +	len += (2 * ((unsigned int) size_XMLCh));
   
   	checkAndExpand(len);
   
  @@ -640,7 +644,7 @@
   	assert (t != NULL);
   
   	len += XMLString::stringLen(t);
  -	len += (2 * size_XMLCh);
  +	len += (unsigned int) (2 * size_XMLCh);
   
   	checkAndExpand(len);
   
  @@ -664,7 +668,7 @@
   int safeBuffer::sbStrlen(void) const {
   
   	checkBufferType(BUFFER_CHAR);
  -	return (strlen ((char *) buffer));
  +	return (int) (strlen ((char *) buffer));
   
   }
   
  
  
  
  1.7       +10 -10    xml-security/c/src/utils/winutils/XSECBinHTTPURIInputStream.cpp
  
  Index: XSECBinHTTPURIInputStream.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/utils/winutils/XSECBinHTTPURIInputStream.cpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- XSECBinHTTPURIInputStream.cpp	8 Feb 2004 10:25:40 -0000	1.6
  +++ XSECBinHTTPURIInputStream.cpp	7 Mar 2004 03:20:52 -0000	1.7
  @@ -174,7 +174,7 @@
   
   unsigned short XSECBinHTTPURIInputStream::socket(int af,int type,int protocol)
   {
  -	return (*gWSsocket)(af,type,protocol);
  +	return (unsigned short) (*gWSsocket)(af,type,protocol);
   }
   
   int XSECBinHTTPURIInputStream::connect(unsigned short s,const sockaddr* name,int namelen)
  @@ -273,7 +273,7 @@
   							"Error reported creating socket");
       }
   
  -    if (connect(s, (struct sockaddr *) &sa, sizeof(sa)) == SOCKET_ERROR)
  +    if (connect((unsigned short) s, (struct sockaddr *) &sa, sizeof(sa)) == SOCKET_ERROR)
       {
           // Call WSAGetLastError() to get the error number.
           throw XSECException(XSECException::HTTPURIInputStreamError,
  @@ -313,15 +313,15 @@
       if (portNumber != 80)
       {
           strcat(fBuffer, ":");
  -        int i = strlen(fBuffer);
  +        int i = (int) strlen(fBuffer);
           _itoa(portNumber, fBuffer+i, 10);
       }
       strcat(fBuffer, "\r\n\r\n");
   
       // Send the http request
  -    int lent = strlen(fBuffer);
  +    int lent = (int) strlen(fBuffer);
       int  aLent = 0;
  -    if ((aLent = send(s, fBuffer, lent, 0)) != lent)
  +    if ((aLent = send((unsigned short) s, fBuffer, lent, 0)) != lent)
       {
           // Call WSAGetLastError() to get the error number.
           throw XSECException(XSECException::HTTPURIInputStreamError,
  @@ -333,7 +333,7 @@
       // get the response, check the http header for errors from the server.
       //
       memset(fBuffer, 0, sizeof(fBuffer));
  -    aLent = recv(s, fBuffer, sizeof(fBuffer)-1, 0);
  +    aLent = recv((unsigned short) s, fBuffer, sizeof(fBuffer)-1, 0);
       if (aLent == SOCKET_ERROR || aLent == 0)
       {
           // Call WSAGetLastError() to get the error number.
  @@ -369,7 +369,7 @@
               {
                   //
                   // Header is not yet read, do another recv() to get more data...
  -                aLent = recv(s, fBufferEnd, (sizeof(fBuffer) - 1) - (fBufferEnd - fBuffer), 0);
  +                aLent = recv((unsigned short) s, fBufferEnd, (sizeof(fBuffer) - 1) - (fBufferEnd - fBuffer), 0);
                   if (aLent == SOCKET_ERROR || aLent == 0)
                   {
                       // Call WSAGetLastError() to get the error number.
  @@ -488,7 +488,7 @@
   unsigned int XSECBinHTTPURIInputStream::readBytes(XMLByte* const    toFill
                                       , const unsigned int    maxToRead)
   {
  -    unsigned int len = fBufferEnd - fBufferPos;
  +    unsigned int len = (unsigned int) (fBufferEnd - fBufferPos);
       if (len > 0)
       {
           // If there's any data left over in the buffer into which we first
  @@ -503,7 +503,7 @@
           // There was no data in the local buffer.
           // Read some from the socket, straight into our caller's buffer.
           //
  -        len = recv((SOCKET) fSocketHandle, (char *) toFill, maxToRead, 0);
  +        len = recv(fSocketHandle, (char *) toFill, maxToRead, 0);
           if (len == SOCKET_ERROR)
           {
               // Call WSAGetLastError() to get the error number.
  
  
  
  1.10      +2 -2      xml-security/c/src/xenc/impl/XENCAlgorithmHandlerDefault.cpp
  
  Index: XENCAlgorithmHandlerDefault.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/xenc/impl/XENCAlgorithmHandlerDefault.cpp,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- XENCAlgorithmHandlerDefault.cpp	8 Feb 2004 10:26:00 -0000	1.9
  +++ XENCAlgorithmHandlerDefault.cpp	7 Mar 2004 03:20:52 -0000	1.10
  @@ -600,7 +600,7 @@
   			char * oaepParamsStr = XMLString::transcode(oaepParams);
   			ArrayJanitor<char> j_oaepParamsStr(oaepParamsStr);
   
  -			unsigned int bufLen = strlen(oaepParamsStr);
  +			unsigned int bufLen = (unsigned int) strlen(oaepParamsStr);
   			oaepParamsBuf = new unsigned char[bufLen];
   			ArrayJanitor<unsigned char> j_oaepParamsBuf(oaepParamsBuf);
   
  
  
  
  1.18      +3 -3      xml-security/c/src/xenc/impl/XENCCipherImpl.cpp
  
  Index: XENCCipherImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/xenc/impl/XENCCipherImpl.cpp,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- XENCCipherImpl.cpp	8 Feb 2004 10:26:01 -0000	1.17
  +++ XENCCipherImpl.cpp	7 Mar 2004 03:20:52 -0000	1.18
  @@ -352,7 +352,7 @@
   	XSECCryptoKey * ret = NULL;
   	XSECAlgorithmHandler *handler;
   
  -	int kLen = kil->getSize();
  +	int kLen = (int) kil->getSize();
   
   	for (int i = 0; ret == NULL && i < kLen ; ++ i) {
   
  @@ -666,7 +666,7 @@
   
   	}
   
  -	keySize = (keySize < maxKeySize ? keySize : maxKeySize);
  +	keySize = (keySize < (unsigned int) maxKeySize ? keySize : (unsigned int) maxKeySize);
   	memcpy(rawKey, sb.rawBuffer(), keySize);
   
   	return keySize;