Re: New version of libccid: 1.4.15

Greg Troxel <[email protected]>
Newsgroups gmane.comp.lib.muscle
Message-ID <[email protected]>
Ludovic Rousseau <[email protected]> writes:

> I just released a version 1.4.15 of libccid the free software CCID
> class smart card reader driver.
> http://ludovicrousseau.blogspot.fr/2014/02/new-version-of-libccid-1415.html

I updated pkgsrc/security/ccid to 1.4.15.  The code builds fine on
NetBSD/i386 6-stable with gcc.



In pkgsrc, the following patches are applied against ccid, and probably
they should be applied upstream.

$NetBSD: patch-ab,v 1.2 2012/12/15 00:29:31 pettai Exp $

--- src/commands.c.orig	2012-12-11 19:36:05.000000000 +0000
+++ src/commands.c
@@ -161,7 +161,7 @@ RESPONSECODE CmdPowerOn(unsigned int rea
 
 			/* Status Information? */
 			if (0x40 == tmp[0])
-				ccid_error(tmp[2], __FILE__, __LINE__, __FUNCTION__);
+				ccid_error(tmp[2], __FILE__, __LINE__, (const char *) __FUNCTION__);
 			return IFD_COMMUNICATION_ERROR;
 		}
 
@@ -230,7 +230,7 @@ again:
 
 	if (buffer[STATUS_OFFSET] & CCID_COMMAND_FAILED)
 	{
-		ccid_error(buffer[ERROR_OFFSET], __FILE__, __LINE__, __FUNCTION__);    /* bError */
+		ccid_error(buffer[ERROR_OFFSET], __FILE__, __LINE__, (const char *) __FUNCTION__);    /* bError */
 
 		if (0xBB == buffer[ERROR_OFFSET] &&	/* Protocol error in EMV mode */
 			((GEMPC433 == ccid_descriptor->readerID)
@@ -823,7 +823,7 @@ again:
 
 	if (cmd_out[STATUS_OFFSET] & CCID_COMMAND_FAILED)
 	{
-		ccid_error(cmd_out[ERROR_OFFSET], __FILE__, __LINE__, __FUNCTION__);    /* bError */
+		ccid_error(cmd_out[ERROR_OFFSET], __FILE__, __LINE__, (const char *) __FUNCTION__);    /* bError */
 		return_value = IFD_COMMUNICATION_ERROR;
 	}
 
@@ -925,7 +925,7 @@ RESPONSECODE CmdPowerOff(unsigned int re
 
 	if (cmd[STATUS_OFFSET] & CCID_COMMAND_FAILED)
 	{
-		ccid_error(cmd[ERROR_OFFSET], __FILE__, __LINE__, __FUNCTION__);    /* bError */
+		ccid_error(cmd[ERROR_OFFSET], __FILE__, __LINE__, (const char *) __FUNCTION__);    /* bError */
 		return_value = IFD_COMMUNICATION_ERROR;
 	}
 
@@ -1052,7 +1052,7 @@ again_status:
 		&& (buffer[ERROR_OFFSET] != 0xFE))
 	{
 		return_value = IFD_COMMUNICATION_ERROR;
-		ccid_error(buffer[ERROR_OFFSET], __FILE__, __LINE__, __FUNCTION__);    /* bError */
+		ccid_error(buffer[ERROR_OFFSET], __FILE__, __LINE__, (const char *) __FUNCTION__);    /* bError */
 	}
 
 	return return_value;
@@ -1278,7 +1278,7 @@ time_request_ICCD_B:
 
 			case 0x40:
 				/* Status Information */
-				ccid_error(rx_buffer[2], __FILE__, __LINE__, __FUNCTION__);
+				ccid_error(rx_buffer[2], __FILE__, __LINE__, (const char *) __FUNCTION__);
 				return IFD_COMMUNICATION_ERROR;
 
 			case 0x80:
@@ -1336,7 +1336,7 @@ time_request:
 
 	if (cmd[STATUS_OFFSET] & CCID_COMMAND_FAILED)
 	{
-		ccid_error(cmd[ERROR_OFFSET], __FILE__, __LINE__, __FUNCTION__);    /* bError */
+		ccid_error(cmd[ERROR_OFFSET], __FILE__, __LINE__, (const char *) __FUNCTION__);    /* bError */
 		switch (cmd[ERROR_OFFSET])
 		{
 			case 0xEF:	/* cancel */
@@ -2083,7 +2083,7 @@ RESPONSECODE SetParameters(unsigned int 
 
 	if (cmd[STATUS_OFFSET] & CCID_COMMAND_FAILED)
 	{
-		ccid_error(cmd[ERROR_OFFSET], __FILE__, __LINE__, __FUNCTION__);    /* bError */
+		ccid_error(cmd[ERROR_OFFSET], __FILE__, __LINE__, (const char *) __FUNCTION__);    /* bError */
 		if (0x00 == cmd[ERROR_OFFSET])	/* command not supported */
 			return IFD_NOT_SUPPORTED;
 		else


$NetBSD: patch-ad,v 1.2 2012/12/15 00:29:31 pettai Exp $

--- src/ccid_usb.c.orig	2012-12-11 19:45:39.000000000 +0000
+++ src/ccid_usb.c
@@ -1106,7 +1106,7 @@ int InterruptRead(int reader_index, int 
 	switch (ret)
 	{
 		case LIBUSB_TRANSFER_COMPLETED:
-			DEBUG_XXD("NotifySlotChange: ", buffer, actual_length);
+			DEBUG_XXD("NotifySlotChange: ", (const unsigned char *) buffer, actual_length);
 			break;
 
 		case LIBUSB_TRANSFER_TIMED_OUT:

_______________________________________________
Muscle mailing list
[email protected]
http://lists.musclecard.com/mailman/listinfo/muscle_lists.musclecard.com
signature.asc (application/pgp-signature, 180 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAlMM0SoACgkQ+vesoDJhHiU/+gCeLyasBU+FVbUWUyyLEQmp6VO6
XWcAn3wT0+Yoaepb4g2ZwoeYvSEpc1XB
=iQ+O
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.