diff options
author | shannonjr <shannonjr@pkgsrc.org> | 2008-03-04 11:30:08 +0000 |
---|---|---|
committer | shannonjr <shannonjr@pkgsrc.org> | 2008-03-04 11:30:08 +0000 |
commit | 30a5bfae3e9d069f4bce14dbf4ff6a954097c47e (patch) | |
tree | 81dd60cbdd1969b868cad7de79a25e2a5b7959ac | |
parent | d6204794ef32f7e23ff31ae47a5887f29da89356 (diff) | |
download | pkgsrc-30a5bfae3e9d069f4bce14dbf4ff6a954097c47e.tar.gz |
This package provides a generic USB CCID (Chip/Smart Card Interface
Devices) driver and ICCD (Integrated Circuit(s) Card Devices).
See the USB CCID and ICCD specifications from the USB working group.
-rw-r--r-- | security/ccid/DESCR | 6 | ||||
-rw-r--r-- | security/ccid/Makefile | 38 | ||||
-rw-r--r-- | security/ccid/PLIST | 11 | ||||
-rw-r--r-- | security/ccid/buildlink3.mk | 21 | ||||
-rw-r--r-- | security/ccid/distinfo | 9 | ||||
-rw-r--r-- | security/ccid/patches/patch-aa | 15 | ||||
-rw-r--r-- | security/ccid/patches/patch-ab | 94 | ||||
-rw-r--r-- | security/ccid/patches/patch-ac | 13 | ||||
-rw-r--r-- | security/ccid/patches/patch-ad | 13 |
9 files changed, 220 insertions, 0 deletions
diff --git a/security/ccid/DESCR b/security/ccid/DESCR new file mode 100644 index 00000000000..37f2068456d --- /dev/null +++ b/security/ccid/DESCR @@ -0,0 +1,6 @@ +This package provides a generic USB CCID +(Chip/Smart Card Interface Devices) driver +and ICCD (Integrated Circuit(s) Card Devices). + +See the USB CCID and ICCD specifications +from the USB working group. diff --git a/security/ccid/Makefile b/security/ccid/Makefile new file mode 100644 index 00000000000..96ac52110ee --- /dev/null +++ b/security/ccid/Makefile @@ -0,0 +1,38 @@ +# $NetBSD: Makefile,v 1.1.1.1 2008/03/04 11:30:08 shannonjr Exp $ +# + +DISTNAME= ccid-1.3.5 +CATEGORIES= security +MASTER_SITES= http://alioth.debian.org/frs/download.php/2330/ + +MAINTAINER= shannonjr@NetBSD.org +HOMEPAGE= http://pcsclite.alioth.debian.org/ccid.html +COMMENT= Middleware to access a smart card using SCard API (PC/SC) + +.include "../../mk/bsd.prefs.mk" + +GNU_CONFIGURE= yes +USE_LIBTOOL= yes +USE_TOOLS+= pkg-config +USE_TOOLS+= autoconf automake aclocal autoheader +USE_TOOLS+= flex +USE_LANGUAGES= c c++ + +CONFIGURE_ARGS+= --sharedstatedir=${VARBASE:Q} +CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q} + +SUBST_CLASSES+= perl +SUBST_STAGE.perl= post-patch +SUBST_FILES.perl= src/convert_version.pl src/create_Info_plist.pl +SUBST_SED.perl= -e 's,/usr/bin/perl,${PERL5},' + +pre-configure: + cd ${WRKSRC} && ${SH} bootstrap + +post-install: + ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/ccid/README + +.include "../../security/pcsc-lite/buildlink3.mk" +.include "../../devel/libusb/buildlink3.mk" +.include "../../mk/pthread.buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/security/ccid/PLIST b/security/ccid/PLIST new file mode 100644 index 00000000000..d2fb4259e00 --- /dev/null +++ b/security/ccid/PLIST @@ -0,0 +1,11 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2008/03/04 11:30:08 shannonjr Exp $ +bin/RSA_SecurID_getpasswd +man/man1/RSA_SecurID_getpasswd.1 +man/man8/Kobil_mIDentity_switch.8 +lib/pcsc-lite/drivers/ifd-ccid.bundle/Contents/Info.plist +lib/pcsc-lite/drivers/ifd-ccid.bundle/Contents/${OPSYS}/libccid.so.${PKGVERSION} +sbin/Kobil_mIDentity_switch +share/doc/ccid/README_Kobil_mIDentity_switch.txt +share/doc/ccid/README +@dirrm share/doc/ccid +@dirrm pcsc/drivers/ifd-ccid.bundle/Contents/${OPSYS} diff --git a/security/ccid/buildlink3.mk b/security/ccid/buildlink3.mk new file mode 100644 index 00000000000..c4ef8b11e22 --- /dev/null +++ b/security/ccid/buildlink3.mk @@ -0,0 +1,21 @@ +# $NetBSD: buildlink3.mk,v 1.1.1.1 2008/03/04 11:30:08 shannonjr Exp $ + +BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ +CCID_BUILDLINK3_MK:= ${CCID_BUILDLINK3_MK}+ + +.if ${BUILDLINK_DEPTH} == "+" +BUILDLINK_DEPENDS+= ccid +.endif + +BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nccid} +BUILDLINK_PACKAGES+= ccid +BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}ccid + +.if ${CCID_BUILDLINK3_MK} == "+" +BUILDLINK_API_DEPENDS.ccid+= ccid>=1.3.2 +BUILDLINK_PKGSRCDIR.ccid?= ../../local/ccid +.endif # CCID_BUILDLINK3_MK + +.include "../../local/pcsc-lite/buildlink3.mk" + +BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} diff --git a/security/ccid/distinfo b/security/ccid/distinfo new file mode 100644 index 00000000000..271f3326f76 --- /dev/null +++ b/security/ccid/distinfo @@ -0,0 +1,9 @@ +$NetBSD: distinfo,v 1.1.1.1 2008/03/04 11:30:08 shannonjr Exp $ + +SHA1 (ccid-1.3.5.tar.gz) = feb59183184203eda8d86f39f8f283954c0d05da +RMD160 (ccid-1.3.5.tar.gz) = dd163b4ec702fbd2c57b14f6392452232fcea543 +Size (ccid-1.3.5.tar.gz) = 593801 bytes +SHA1 (patch-aa) = a46b893c1410f876248a2e0d3972524a8ff50c9f +SHA1 (patch-ab) = 13db7c54d6c45aa1cb61489a7f2b38f4155793cd +SHA1 (patch-ac) = 8c6f47d173ccf3b7794e828b9f7887bf26920f44 +SHA1 (patch-ad) = 1eaae5649357cafbb7b612d45d4522bce7148f55 diff --git a/security/ccid/patches/patch-aa b/security/ccid/patches/patch-aa new file mode 100644 index 00000000000..83fe37ae1eb --- /dev/null +++ b/security/ccid/patches/patch-aa @@ -0,0 +1,15 @@ +$NetBSD: patch-aa,v 1.1.1.1 2008/03/04 11:30:08 shannonjr Exp $ + +--- configure.in.orig 2008-01-22 12:33:34.000000000 -0700 ++++ configure.in +@@ -93,6 +93,10 @@ case "$host" in + BUNDLE_HOST="FreeBSD" + DYN_LIB_EXT="so" + ;; ++*-*-netbsd*) ++ BUNDLE_HOST="NetBSD" ++ DYN_LIB_EXT="so" ++ ;; + *-*-openbsd*) + BUNDLE_HOST="OpenBSD" + DYN_LIB_EXT="so.0.0" diff --git a/security/ccid/patches/patch-ab b/security/ccid/patches/patch-ab new file mode 100644 index 00000000000..05ab2a12769 --- /dev/null +++ b/security/ccid/patches/patch-ab @@ -0,0 +1,94 @@ +$NetBSD: patch-ab,v 1.1.1.1 2008/03/04 11:30:08 shannonjr Exp $ + +--- src/commands.c.orig 2008-02-06 01:11:11.000000000 -0700 ++++ src/commands.c +@@ -153,7 +153,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; + } + +@@ -200,7 +200,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) +@@ -711,7 +711,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; + } + +@@ -811,7 +811,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; + } + +@@ -942,7 +942,7 @@ again_status: + || (OZ776_7772 == ccid_descriptor->readerID)) + && (buffer[ERROR_OFFSET] == 0xFE))) + #endif +- ccid_error(buffer[ERROR_OFFSET], __FILE__, __LINE__, __FUNCTION__); /* bError */ ++ ccid_error(buffer[ERROR_OFFSET], __FILE__, __LINE__, (const char *) __FUNCTION__); /* bError */ + + /* card absent or mute is not an communication error */ + if (buffer[ERROR_OFFSET] != 0xFE) +@@ -1028,7 +1028,7 @@ RESPONSECODE CCID_Transmit(unsigned int + int r; + + /* Xfr Block */ +- r = ControlUSB(reader_index, 0x21, 0x65, 0, tx_buffer, tx_length); ++ r = ControlUSB(reader_index, 0x21, 0x65, 0, (unsigned char *) tx_buffer, tx_length); + + /* we got an error? */ + if (r < 0) +@@ -1050,7 +1050,7 @@ RESPONSECODE CCID_Transmit(unsigned int + + /* Xfr Block */ + DEBUG_COMM2("chain parameter: %d", rx_length); +- r = ControlUSB(reader_index, 0x21, 0x65, rx_length << 8, tx_buffer, ++ r = ControlUSB(reader_index, 0x21, 0x65, rx_length << 8, (unsigned char *) tx_buffer, + tx_length); + + /* we got an error? */ +@@ -1175,7 +1175,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: +@@ -1233,7 +1233,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 */ +@@ -1966,7 +1966,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 diff --git a/security/ccid/patches/patch-ac b/security/ccid/patches/patch-ac new file mode 100644 index 00000000000..556456114d2 --- /dev/null +++ b/security/ccid/patches/patch-ac @@ -0,0 +1,13 @@ +$NetBSD: patch-ac,v 1.1.1.1 2008/03/04 11:30:08 shannonjr Exp $ + +--- src/parse.c.orig 2008-02-06 01:26:23.000000000 -0700 ++++ src/parse.c +@@ -151,7 +151,7 @@ static int ccid_parse_interface_descript + { + struct usb_interface_descriptor *usb_interface; + unsigned char *extra; +- unsigned char buffer[256*sizeof(int)]; /* maximum is 256 records */ ++ char buffer[256*sizeof(int)]; /* maximum is 256 records */ + + /* + * Vendor/model name diff --git a/security/ccid/patches/patch-ad b/security/ccid/patches/patch-ad new file mode 100644 index 00000000000..86ac119729f --- /dev/null +++ b/security/ccid/patches/patch-ad @@ -0,0 +1,13 @@ +$NetBSD: patch-ad,v 1.1.1.1 2008/03/04 11:30:08 shannonjr Exp $ + +--- src/ccid_usb.c.orig 2008-02-08 02:16:38.000000000 -0700 ++++ src/ccid_usb.c +@@ -880,7 +880,7 @@ int InterruptRead(int reader_index) + usbDevice[reader_index].filename, strerror(errno)); + } + else +- DEBUG_XXD("NotifySlotChange: ", buffer, ret); ++ DEBUG_XXD("NotifySlotChange: ", (const unsigned char *) buffer, ret); + + return ret; + } /* InterruptRead */ |