santuario-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scan...@apache.org
Subject svn commit: r1002891 - in /santuario/trunk/c/src/enc/NSS: NSSCryptoKeyDSA.cpp NSSCryptoKeyRSA.cpp
Date Wed, 29 Sep 2010 23:30:19 GMT
Author: scantor
Date: Wed Sep 29 23:30:19 2010
New Revision: 1002891

URL: http://svn.apache.org/viewvc?rev=1002891&view=rev
Log:
Fix Windows types in NSS code.

Modified:
    santuario/trunk/c/src/enc/NSS/NSSCryptoKeyDSA.cpp
    santuario/trunk/c/src/enc/NSS/NSSCryptoKeyRSA.cpp

Modified: santuario/trunk/c/src/enc/NSS/NSSCryptoKeyDSA.cpp
URL: http://svn.apache.org/viewvc/santuario/trunk/c/src/enc/NSS/NSSCryptoKeyDSA.cpp?rev=1002891&r1=1002890&r2=1002891&view=diff
==============================================================================
--- santuario/trunk/c/src/enc/NSS/NSSCryptoKeyDSA.cpp (original)
+++ santuario/trunk/c/src/enc/NSS/NSSCryptoKeyDSA.cpp Wed Sep 29 23:30:19 2010
@@ -285,9 +285,9 @@ bool NSSCryptoKeyDSA::verifyBase64Signat
 
 	// Decode the signature
 	unsigned char * rawSig;
-	DWORD rawSigLen;
-	XSECnew(rawSig, BYTE [sigLen]);
-	ArrayJanitor<BYTE> j_rawSig(rawSig);
+	unsigned int rawSigLen;
+	XSECnew(rawSig, unsigned char[sigLen]);
+	ArrayJanitor<unsigned char> j_rawSig(rawSig);
 
 	// Decode the signature
 	XSCryptCryptoBase64 b64;
@@ -334,8 +334,8 @@ unsigned int NSSCryptoKeyDSA::signBase64
   unsigned int signatureLen = PK11_SignatureLen(mp_privkey);
 
   unsigned char * rawSig;
-	XSECnew(rawSig, BYTE [signatureLen]);
-	ArrayJanitor<BYTE> j_rawSig(rawSig);
+	XSECnew(rawSig, unsigned char[signatureLen]);
+	ArrayJanitor<unsigned char> j_rawSig(rawSig);
 
   SECItem signature;
   signature.type = siBuffer;
@@ -621,4 +621,4 @@ unsigned int NSSCryptoKeyDSA::getYBase64
 
 }
 
-#endif /* XSEC_HAVE_NSS */
\ No newline at end of file
+#endif /* XSEC_HAVE_NSS */

Modified: santuario/trunk/c/src/enc/NSS/NSSCryptoKeyRSA.cpp
URL: http://svn.apache.org/viewvc/santuario/trunk/c/src/enc/NSS/NSSCryptoKeyRSA.cpp?rev=1002891&r1=1002890&r2=1002891&view=diff
==============================================================================
--- santuario/trunk/c/src/enc/NSS/NSSCryptoKeyRSA.cpp (original)
+++ santuario/trunk/c/src/enc/NSS/NSSCryptoKeyRSA.cpp Wed Sep 29 23:30:19 2010
@@ -255,9 +255,9 @@ bool NSSCryptoKeyRSA::verifySHA1PKCS1Bas
 
 	// Decode the signature
 	unsigned char * rawSig;
-	DWORD rawSigLen;
-	XSECnew(rawSig, BYTE [sigLen]);
-	ArrayJanitor<BYTE> j_rawSig(rawSig);
+	unsigned int rawSigLen;
+	XSECnew(rawSig, unsigned char[sigLen]);
+	ArrayJanitor<unsigned char> j_rawSig(rawSig);
 
 	// Decode the signature
 	XSCryptCryptoBase64 b64;
@@ -303,8 +303,8 @@ unsigned int NSSCryptoKeyRSA::signSHA1PK
 	}
 	
 	unsigned char * rawSig;
-	XSECnew(rawSig, BYTE [base64SignatureBufLen]);
-	ArrayJanitor<BYTE> j_rawSig(rawSig);
+	XSECnew(rawSig, unsigned char[base64SignatureBufLen]);
+	ArrayJanitor<unsigned char> j_rawSig(rawSig);
 	
 	SECItem signature;
 	signature.type = siBuffer;
@@ -480,7 +480,7 @@ unsigned int NSSCryptoKeyRSA::privateDec
 	DWORD decryptSize = inLength;
 
   SECStatus s;
-  BYTE *ptr = NULL;
+  unsigned char *ptr = NULL;
 
 	switch (padding) {
 
@@ -501,7 +501,7 @@ unsigned int NSSCryptoKeyRSA::privateDec
 		}
 
     //do the padding (http://www.w3.org/TR/xmlenc-core/#rsa-1_5)
-    ptr = (BYTE*) memchr(plainBuf, 0x02, decryptSize);
+    ptr = (unsigned char*) memchr(plainBuf, 0x02, decryptSize);
 		if( ptr )
 		{
 			unsigned int bytesToRemove = ((ptr-plainBuf)+1);
@@ -509,7 +509,7 @@ unsigned int NSSCryptoKeyRSA::privateDec
 			decryptSize -= bytesToRemove;
 		}
 
-		ptr = (BYTE*) memchr(plainBuf, 0x00, decryptSize);
+		ptr = (unsigned char*) memchr(plainBuf, 0x00, decryptSize);
 		if( ptr )
 		{
 			unsigned int bytesToRemove = ((ptr-plainBuf)+1);
@@ -568,9 +568,9 @@ unsigned int NSSCryptoKeyRSA::publicEncr
 
   SECStatus s;
 
-  BYTE * buf;
-  XSECnew(buf, BYTE[encryptSize]);
-  ArrayJanitor<BYTE> j_buf(buf);
+  unsigned char * buf;
+  XSECnew(buf, unsigned char[encryptSize]);
+  ArrayJanitor<unsigned char> j_buf(buf);
 
 	switch (padding) {
 
@@ -749,4 +749,4 @@ unsigned int NSSCryptoKeyRSA::getModulus
 	return bLen;
 }
 
-#endif /* XSEC_HAVE_NSS */
\ No newline at end of file
+#endif /* XSEC_HAVE_NSS */



Mime
View raw message