[Pcsclite-cvs-commit] r417 - trunk/MusclePAM

Ludovic Rousseau rousseau at costa.debian.org
Thu Mar 16 10:49:10 CET 2006


Author: rousseau
Date: 2006-03-16 09:49:09 +0000 (Thu, 16 Mar 2006)
New Revision: 417

Modified:
   trunk/MusclePAM/pam_smartcard.c
Log:
correct "... differ in signedness" compilation warnings


Modified: trunk/MusclePAM/pam_smartcard.c
===================================================================
--- trunk/MusclePAM/pam_smartcard.c	2006-03-16 09:43:23 UTC (rev 416)
+++ trunk/MusclePAM/pam_smartcard.c	2006-03-16 09:49:09 UTC (rev 417)
@@ -143,7 +143,7 @@
   int index, rv;
   X509 *tmpCert, *rootCert;
   STACK *emlst;
-  unsigned char *userid;  
+  char *userid;  
   char *p;
 
   rv = getCardCert(pConnection, &tmpCert);
@@ -257,7 +257,7 @@
   int rv = 0;
   EVP_PKEY *tmpCert;
   X509 *tmpCert1;
-  unsigned char homeFile[200];
+  char homeFile[200];
   /* tries to get a public key information from the user's public key certificate */
 
   /* Is userpath defined? If so, use it as a way to 'find' someone's
@@ -326,7 +326,7 @@
   struct secure_data *sd;
   int i, rv, reader, result;
   int try_first_pass, use_first_pass;
-  unsigned char error[150];
+  char error[150];
   //unsigned char nameBuf[100];
   X509 *userCert = 0;
   EVP_PKEY *pubkey;
@@ -419,7 +419,8 @@
 
   /* verify chv1 */
 
-  rv = MSCVerifyPIN(&pConnection, pr.pinnumber, sd->pin, PIN_SIZE);
+  rv = MSCVerifyPIN(&pConnection, pr.pinnumber, (unsigned char *)sd->pin,
+	PIN_SIZE);
   
   if (rv != MSC_SUCCESS) {
     if (pr.debug) printf("Invalid PIN Entered\n");
@@ -497,8 +498,8 @@
 
 #endif
 
-  rv = RSA_public_decrypt(128, sd->cipher, sd->plain, pubkey->pkey.rsa, 
-			   RSA_NO_PADDING);  
+  rv = RSA_public_decrypt(128, (unsigned char *)sd->cipher,
+	(unsigned char *)sd->plain, pubkey->pkey.rsa, RSA_NO_PADDING);  
 
   syslog(LOG_ERR, "CLEAR %02X %02X %02X\n", (unsigned char)sd->plain[0], 
 	 (unsigned char)sd->plain[1], (unsigned char)sd->plain[0x79]);
@@ -756,7 +757,8 @@
   }
 
   /* try to change pin */
-  rv = MSCChangePIN(&pConnection, 1, sd->pin, PIN_SIZE, sd->new1, PIN_SIZE);
+  rv = MSCChangePIN(&pConnection, 1, (unsigned char *)sd->pin, PIN_SIZE,
+	(unsigned char *)sd->new1, PIN_SIZE);
 
   if (rv != MSC_SUCCESS) {
     syslog(LOG_ERR, "pc/sc error: %s", pcsc_stringify_error(rv));




More information about the Pcsclite-cvs-commit mailing list