[Lunar-commits] <moonbase-other> Merge pull request #113 from Ratler/smartcard-stack

Peter de Ridder peter at lunar-linux.org
Sun Nov 3 16:29:17 CET 2013


commit 225703bcecc8ff967dac275db722b5cc32ada97c
Author: Peter de Ridder <peter at lunar-linux.org>
Date: Sun, 03 Nov 2013 08:27:30 -0800
URL: https://github.com/lunar-linux/moonbase-other/commit/225703bcecc8ff967dac275db722b5cc32ada97c

Merge pull request #113 from Ratler/smartcard-stack

PC/SC smartcard stack
---
  crypto/ccid/92-pcscd-ccid.rules         | +48/-0    
  crypto/ccid/BUILD                       | +3/-0     
  crypto/ccid/DEPENDS                     | +3/-0     
  crypto/ccid/DETAILS                     | +14/-0    
  crypto/ccid/POST_INSTALL                | +1/-0     
  crypto/ccid/PRE_BUILD                   | +4/-0     
  crypto/gppcscconnectionplugin/DEPENDS   | +4/-0     
  crypto/gppcscconnectionplugin/DETAILS   | +14/-0    
  crypto/gpshell/DEPENDS                  | +5/-0     
  crypto/gpshell/DETAILS                  | +13/-0    
  crypto/monkeysphere/DEPENDS             | +5/-0     
  crypto/monkeysphere/DETAILS             | +13/-0    
  devel/opensc/DEPENDS                    | +7/-0     
  devel/opensc/DETAILS                    | +15/-0    
  libs/globalplatform/DEPENDS             | +3/-0     
  libs/globalplatform/DETAILS             | +15/-0    
  libs/liblockfile/DETAILS                | +13/-0    
  perl/Crypt-OpenSSL-Bignum/BUILD         | +2/-0     
  perl/Crypt-OpenSSL-Bignum/DEPENDS       | +2/-0     
  perl/Crypt-OpenSSL-Bignum/DETAILS       | +12/-0    
  utils/lockfile-progs/BUILD              | +5/-0     
  utils/lockfile-progs/DEPENDS            | +1/-0     
  utils/lockfile-progs/DETAILS            | +13/-0    
  utils/pcsc-lite/99-pcscd-hotplug.rules  | +1/-0     
  utils/pcsc-lite/BUILD                   | +10/-0    
  utils/pcsc-lite/DEPENDS                 | +3/-0     
  utils/pcsc-lite/DETAILS                 | +12/-0    
  utils/pcsc-lite/POST_INSTALL            | +1/-0     
  utils/pcsc-lite/PRE_BUILD               | +4/-0     
  utils/pcsc-lite/systemd.d/pcscd.service | +12/-0    
  utils/pcsc-lite/systemd.d/pcscd.socket  | +8/-0     
  utils/pcsc-lite/tmpfiles.d/pcscd.conf   | +1/-0     
  32 files changed, 267 insertions(+)

--- /dev/null
+++ b/crypto/ccid/92-pcscd-ccid.rules
@@ -0,0 +1,48 @@
+# udev rules to set the access rights of CCID smart card readers
+# so they can be used by pcscd
+
+# Gemplus PCMCIA Card
+#SUBSYSTEMS=="pcmcia", DRIVERS=="serial_cs", ACTION=="add", ATTRS{prod_id1}=="Gemplus", ATTRS{prod_id2}=="SerialPort", ATTRS{prod_id3}=="GemPC Card", RUN+="/usr/sbin/pcscd --hotplug" 
+
+# If not adding the device, go away
+ACTION!="add", GOTO="pcscd_ccid_rules_end"
+SUBSYSTEM!="usb", GOTO="pcscd_ccid_rules_end"
+ENV{DEVTYPE}!="usb_device", GOTO="pcscd_ccid_rules_end"
+
+# Kobil mIDentity
+#ATTRS{idVendor}=="0d46", ATTRS{idProduct}=="4081", RUN+="/usr/sbin/Kobil_mIDentity_switch"
+
+# generic CCID device (bInterfaceClass = 0x0b)
+# change group from default "root" to "pcscd"
+ENV{ID_USB_INTERFACES}=="*:0b0000:*", ENV{PCSCD}="1"
+
+# set USB power management to auto. "power/level" has been deprecated in
+# Linux 2.6.35 and replaced by "power/control"
+ENV{ID_USB_INTERFACES}==":0b0000:", RUN+="/bin/sh -c 'echo auto > /sys/$devpath/power/level ; echo auto > /sys/$devpath/power/control'"
+
+# non CCID generic (InterfaceClass: 0xFF)
+# CherrySmartTerminalST2XXX.txt
+ATTRS{idVendor}=="046a", ATTRS{idProduct}=="003e", ENV{PCSCD}="1"
+# DellSK-3106.txt
+ATTRS{idVendor}=="413c", ATTRS{idProduct}=="2100", ENV{PCSCD}="1"
+# MySmartPad.txt
+ATTRS{idVendor}=="09be", ATTRS{idProduct}=="0002", ENV{PCSCD}="1"
+# SCR3310-NTTCom USB SmartCard Reader
+ATTRS{idVendor}=="04e6", ATTRS{idProduct}=="511a", ENV{PCSCD}="1"
+# SCR331-DI USB Smart Card Reader
+ATTRS{idVendor}=="04e6", ATTRS{idProduct}=="5120", ENV{PCSCD}="1"
+# SCR331-DI.txt
+ATTRS{idVendor}=="04e6", ATTRS{idProduct}=="5111", ENV{PCSCD}="1"
+# SDI010.txt
+ATTRS{idVendor}=="04e6", ATTRS{idProduct}=="5121", ENV{PCSCD}="1"
+# SPR532.txt
+ATTRS{idVendor}=="04e6", ATTRS{idProduct}=="e003", ENV{PCSCD}="1"
+# Verisign_secure_storage_token.txt
+ATTRS{idVendor}=="08e6", ATTRS{idProduct}=="1359", ENV{PCSCD}="1"
+# Verisign_secure_token.txt
+ATTRS{idVendor}=="08e6", ATTRS{idProduct}=="ace0", ENV{PCSCD}="1"
+# SchlumbergerSema Cyberflex Access e-gate
+ATTRS{idVendor}=="0973", ATTRS{idProduct}=="0003", ENV{PCSCD}="1"
+
+# All done
+LABEL="pcscd_ccid_rules_end"
--- /dev/null
+++ b/crypto/ccid/BUILD
@@ -0,0 +1,3 @@
+OPTS+=" --enable-twinserial --enable-serialconfdir=/etc/reader.conf.d" &&
+default_build &&
+install -Dm0644 $SCRIPT_DIRECTORY/92-pcscd-ccid.rules /usr/lib/udev/rules.d/92-pcscd-ccid.rules
--- /dev/null
+++ b/crypto/ccid/DEPENDS
@@ -0,0 +1,3 @@
+depends pkgconfig
+depends libusb
+depends pcsc-lite
--- /dev/null
+++ b/crypto/ccid/DETAILS
@@ -0,0 +1,14 @@
+          MODULE=ccid
+         VERSION=1.4.12
+          SOURCE=${MODULE}-${VERSION}.tar.bz2
+      SOURCE_URL=https://alioth.debian.org/frs/download.php/file/3937/
+      SOURCE_VFY=sha1:a14a99ff6575d311dad083a066b80e4e0b6b8731
+        WEB_SITE="http://pcsclite.alioth.debian.org/ccid.html"
+         ENTERED=20131012
+         UPDATED=20131012
+           SHORT="A generic USB Chip/Smart Card Interface Devices driver"
+cat <<EOF
+Provides the source code for a generic USB CCID (Chip/Smart Card
+Interface Devices) driver and  ICCD (Integrated Circuit(s) Card
+Devices).
+EOF
--- /dev/null
+++ b/crypto/ccid/POST_INSTALL
@@ -0,0 +1 @@
+udevadm control --reload
--- /dev/null
+++ b/crypto/ccid/PRE_BUILD
@@ -0,0 +1,4 @@
+default_pre_build &&
+
+# Disable installation of udev rules, we don't need them
+sedit '/$(INSTALL_UDEV_RULE_FILE)/d' src/Makefile.in
--- /dev/null
+++ b/crypto/gppcscconnectionplugin/DEPENDS
@@ -0,0 +1,4 @@
+depends globalplatform
+depends openssl
+depends pcsc-lite
+depends pkgconfig
--- /dev/null
+++ b/crypto/gppcscconnectionplugin/DETAILS
@@ -0,0 +1,14 @@
+          MODULE=gppcscconnectionplugin
+         VERSION=1.1.0
+          SOURCE=${MODULE}-${VERSION}.tar.gz
+      SOURCE_URL=$SFORGE_URL/globalplatform/GlobalPlatform%20Library
+      SOURCE_VFY=sha1:38eb3d739f1b75ba954f09a928a6e9db0178ea53
+        WEB_SITE="http://sourceforge.net/p/globalplatform/wiki/PC-SC%20Connection%20Plugin/"
+         ENTERED=20131012
+         UPDATED=20131012
+           SHORT="PC/SC Connection Plugin for GPShell"
+cat <<EOF
+PC/SC is a standard for accessing smart cards. The PC/SC Connection
+Plugin uses this standard for accessing smart cards and is the default
+connection plugin used by [GPShell].
+EOF
--- /dev/null
+++ b/crypto/gpshell/DEPENDS
@@ -0,0 +1,5 @@
+depends globalplatform
+depends openssl
+depends pcsc-lite
+depends gppcscconnectionplugin
+depends pkgconfig
--- /dev/null
+++ b/crypto/gpshell/DETAILS
@@ -0,0 +1,13 @@
+          MODULE=gpshell
+         VERSION=1.4.4
+          SOURCE=${MODULE}-${VERSION}.tar.gz
+      SOURCE_URL=$SFORGE_URL/globalplatform/GPShell
+      SOURCE_VFY=sha1:3efeb92263e881ff0886e73a7b790051a317df61
+        WEB_SITE="http://sourceforge.net/p/globalplatform/wiki/Home/"
+         ENTERED=20131012
+         UPDATED=20131012
+           SHORT="A script interpreter which talks to a smart card"
+cat <<EOF
+GPShell is a script interpreter which talks to a smart card which
+complies to the [GlobalPlatform Card Specification].
+EOF
--- /dev/null
+++ b/crypto/monkeysphere/DEPENDS
@@ -0,0 +1,5 @@
+depends gnupg
+depends lockfile-progs
+depends Crypt-OpenSSL-RSA
+depends Crypt-OpenSSL-Bignum
+depends Digest-SHA1
--- /dev/null
+++ b/crypto/monkeysphere/DETAILS
@@ -0,0 +1,13 @@
+          MODULE=monkeysphere
+         VERSION=0.36
+          SOURCE=${MODULE}_${VERSION}.orig.tar.gz
+      SOURCE_URL=http://archive.monkeysphere.info/debian/pool/monkeysphere/m/monkeysphere
+SOURCE_DIRECTORY=$BUILD_DIRECTORY/$MODULE-$VERSION
+      SOURCE_VFY=sha1:c4f950346040f7703cb4c6e8b32022f4361d0c9d
+        WEB_SITE="http://web.monkeysphere.info/"
+         ENTERED=20131012
+         UPDATED=20131012
+           SHORT="Leverage the OpenPGP web of trust for OpenSSH and Web authentication"
+cat <<EOF
+Leverage the OpenPGP web of trust for OpenSSH and Web authentication.
+EOF
--- /dev/null
+++ b/devel/opensc/DEPENDS
@@ -0,0 +1,7 @@
+depends pkgconfig
+depends libxslt
+depends docbook-xsl
+optional_depends readline "--enable-readline" "--disable-readline" "for readline support"
+optional_depends openssl "--enable-openssl" "--disable-openssl" "for openssl support"
+optional_depends zlib "--enable-zlib" "--disable-zlib" "for zlib support"
+optional_depends pcsc-lite "--enable-pcsc" "--disable-pcsc" "for pcsc-lite support (recommended)"
--- /dev/null
+++ b/devel/opensc/DETAILS
@@ -0,0 +1,15 @@
+          MODULE=opensc
+         VERSION=0.13.0
+          SOURCE=${MODULE}-${VERSION}.tar.gz
+      SOURCE_URL=http://surfnet.dl.sourceforge.net/project/opensc/OpenSC/opensc-0.13.0/
+      SOURCE_VFY=sha1:9285ccbed7b49f63e488c8fb1b3e102994a28218
+        WEB_SITE="https://github.com/OpenSC/OpenSC/wiki"
+         ENTERED=20131012
+         UPDATED=20131012
+           SHORT="Libraries and applications to access smartcards"
+cat <<EOF
+OpenSC provides a set of libraries and utilities to work with
+smart cards. Its main focus is on cards that support cryptographic
+operations, and facilitate their use in security applications such
+as authentication, mail encryption and digital signatures.
+EOF
--- /dev/null
+++ b/libs/globalplatform/DEPENDS
@@ -0,0 +1,3 @@
+depends openssl
+depends pcsc-lite
+depends pkgconfig
--- /dev/null
+++ b/libs/globalplatform/DETAILS
@@ -0,0 +1,15 @@
+          MODULE=globalplatform
+         VERSION=6.0.0
+          SOURCE=${MODULE}-${VERSION}.tar.gz
+      SOURCE_URL=$SFORGE_URL/$MODULE
+      SOURCE_VFY=sha1:5a08bec4cbcc8caffa7c646a35600712f468553c
+        WEB_SITE="http://sourceforge.net/p/globalplatform/wiki/Home/"
+         ENTERED=20131012
+         UPDATED=20131012
+           SHORT="Implementation of GlobalPlatform smart card specification"
+cat <<EOF
+The GlobalPlatform card specification provides a standard for the
+management of the contents on a smart card. Mainly this comprises
+the installation and the removal of applications. Practically these
+applications are always JavaCard applet.
+EOF
--- /dev/null
+++ b/libs/liblockfile/DETAILS
@@ -0,0 +1,13 @@
+          MODULE=liblockfile
+         VERSION=1.09
+          SOURCE=${MODULE}_${VERSION}.orig.tar.gz
+      SOURCE_URL=http://ftp.debian.org/debian/pool/main/libl/liblockfile
+SOURCE_DIRECTORY=$BUILD_DIRECTORY/$MODULE-$VERSION
+      SOURCE_VFY=sha1:6f3f170bc4c303435ab5b46a6aa49669e16a5a7d
+        WEB_SITE="http://packages.debian.org/unstable/libs/liblockfile1"
+         ENTERED=20131012
+         UPDATED=20131012
+           SHORT="A library with NFS-safe locking functions"
+cat <<EOF
+A library with NFS-safe locking functions.
+EOF
--- /dev/null
+++ b/perl/Crypt-OpenSSL-Bignum/BUILD
@@ -0,0 +1,2 @@
+perl Makefile.PL &&
+default_make
--- /dev/null
+++ b/perl/Crypt-OpenSSL-Bignum/DEPENDS
@@ -0,0 +1,2 @@
+depends perl
+depends openssl
--- /dev/null
+++ b/perl/Crypt-OpenSSL-Bignum/DETAILS
@@ -0,0 +1,12 @@
+          MODULE=Crypt-OpenSSL-Bignum
+         VERSION=0.04
+          SOURCE=${MODULE}-${VERSION}.tar.gz
+      SOURCE_URL=http://search.cpan.org/CPAN/authors/id/I/IR/IROBERTS/
+      SOURCE_VFY=sha1:ce7f856483f4a1f473bc41d77736ff9684b0545e
+        WEB_SITE="http://search.cpan.org/~iroberts/Crypt-OpenSSL-Bignum/"
+         ENTERED=20131012
+         UPDATED=20131012
+           SHORT="OpenSSL's multiprecision integer arithmetic"
+cat <<EOF
+OpenSSL's multiprecision integer arithmetic
+EOF
--- /dev/null
+++ b/utils/lockfile-progs/BUILD
@@ -0,0 +1,5 @@
+make CFLAGS="$CFLAGS"
+prepare_install &&
+mkdir -p /usr/bin /usr/share/man/man1 &&
+install -s -m 0755 bin/* /usr/bin/ &&
+install -m 0644 man/*.1 /usr/share/man/man1/
--- /dev/null
+++ b/utils/lockfile-progs/DEPENDS
@@ -0,0 +1 @@
+depends liblockfile
--- /dev/null
+++ b/utils/lockfile-progs/DETAILS
@@ -0,0 +1,13 @@
+          MODULE=lockfile-progs
+         VERSION=0.1.17
+          SOURCE=${MODULE}_${VERSION}.tar.gz
+      SOURCE_URL=http://ftp.debian.org/debian/pool/main/l/lockfile-progs
+      SOURCE_VFY=sha1:38879f93c5600dc285102bd8155555b755925060
+        WEB_SITE="http://packages.debian.org/unstable/misc/lockfile-progs"
+         ENTERED=20131012
+         UPDATED=20131012
+           SHORT="programs for locking and unlocking files and mailboxes"
+cat <<EOF
+This package includes several programs to safely lock and unlock
+files and mailboxes from the command line.
+EOF
--- /dev/null
+++ b/utils/pcsc-lite/99-pcscd-hotplug.rules
@@ -0,0 +1 @@
+ACTION=="add", ENV{PCSCD}=="1", GROUP="pcscd", RUN+="/usr/bin/env systemctl start pcscd"
--- /dev/null
+++ b/utils/pcsc-lite/BUILD
@@ -0,0 +1,10 @@
+OPTS+=" --enable-libudev \
+--enable-ipcdir=/run/pcscd \
+--enable-usbdropdir=/usr/lib/pcsc/drivers \
+--with-systemdsystemunitdir=$(pkg-config systemd --variable=systemdsystemunitdir) \
+--disable-maintainer-mode"
+
+add_priv_user pcscd:pcscd -s /bin/false -d /run/pcscd &&
+default_build &&
+install -dm 0755 /usr/lib/pcsc/drivers &&
+install -Dm 0644 $SCRIPT_DIRECTORY/99-pcscd-hotplug.rules /usr/lib/udev/rules.d/99-pcscd-hotplug.rules
--- /dev/null
+++ b/utils/pcsc-lite/DEPENDS
@@ -0,0 +1,3 @@
+depends pkgconfig
+depends systemd
+depends Python
--- /dev/null
+++ b/utils/pcsc-lite/DETAILS
@@ -0,0 +1,12 @@
+          MODULE=pcsc-lite
+         VERSION=1.8.8
+          SOURCE=${MODULE}-${VERSION}.tar.bz2
+      SOURCE_URL=https://alioth.debian.org/frs/download.php/file/3862/
+      SOURCE_VFY=sha1:714efaaaf5333e4a04309efd3a6dbc8e7edc61ce
+        WEB_SITE="https://alioth.debian.org/projects/pcsclite/"
+         ENTERED=20131012
+         UPDATED=20131012
+           SHORT="PC/SC Architecture smartcard middleware library"
+cat <<EOF
+Middleware to access a smart card using SCard API (PC/SC).
+EOF
--- /dev/null
+++ b/utils/pcsc-lite/POST_INSTALL
@@ -0,0 +1 @@
+udevadm control --reload
--- /dev/null
+++ b/utils/pcsc-lite/PRE_BUILD
@@ -0,0 +1,4 @@
+default_pre_build &&
+
+# We handle installation of systemd unit files on our own
+sedit 's;^\(install-data-am:\).*;\1;' etc/Makefile.in
--- /dev/null
+++ b/utils/pcsc-lite/systemd.d/pcscd.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=PC/SC Smart Card Daemon
+Requires=pcscd.socket
+
+[Service]
+User=pcscd
+Group=pcscd
+ExecStart=/usr/sbin/pcscd --foreground --auto-exit
+ExecReload=/usr/sbin/pcscd --hotplug
+
+[Install]
+Also=pcscd.socket
--- /dev/null
+++ b/utils/pcsc-lite/systemd.d/pcscd.socket
@@ -0,0 +1,8 @@
+[Unit]
+Description=PC/SC Smart Card Daemon Activation Socket
+
+[Socket]
+ListenStream=/run/pcscd/pcscd.comm
+
+[Install]
+WantedBy=sockets.target
--- /dev/null
+++ b/utils/pcsc-lite/tmpfiles.d/pcscd.conf
@@ -0,0 +1 @@
+d /run/pcscd 0755 pcscd pcscd -




More information about the Lunar-commits mailing list