1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2016 Mike Gerwitz <mtg@gnu.org>
5 ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
7 ;;; This file is part of GNU Guix.
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22 (define-module (gnu packages security-token)
23 #:use-module (gnu packages)
24 #:use-module ((guix licenses) #:prefix license:)
25 #:use-module (guix packages)
26 #:use-module (guix download)
27 #:use-module (guix build-system gnu)
28 #:use-module (gnu packages curl)
29 #:use-module (gnu packages libusb)
30 #:use-module (gnu packages linux)
31 #:use-module (gnu packages man)
32 #:use-module (gnu packages perl)
33 #:use-module (gnu packages pkg-config))
42 "https://alioth.debian.org/frs/download.php/file/4205/"
43 "ccid-" version ".tar.bz2"))
46 "0bxy835c133ajalpj4gx60nqkjvpf9y1n97n04pw105pi9qbyrrj"))))
47 (build-system gnu-build-system)
49 `(#:configure-flags (list (string-append "--enable-usbdropdir=" %output
52 (modify-phases %standard-phases
53 (add-after 'unpack 'patch-Makefile
55 (substitute* "src/Makefile.in"
56 (("/bin/echo") (which "echo")))
60 ("pkg-config" ,pkg-config)))
63 ("pcsc-lite" ,pcsc-lite)))
64 (home-page "https://pcsclite.alioth.debian.org/ccid.html")
65 (synopsis "PC/SC driver for USB smart card devices")
67 "This package provides a PC/SC IFD handler implementation for devices
68 compliant with the CCID and ICCD protocols. It supports a wide range of
69 readers and is needed to communicate with such devices through the
70 @command{pcscd} resource manager.")
71 (license license:lgpl2.1+)))
73 (define-public libyubikey
80 "https://developers.yubico.com/yubico-c/Releases/"
81 name "-" version ".tar.gz"))
84 "009l3k2zyn06dbrlja2d4p2vfnzjhlcqxi88v02mlrnb17mx1v84"))))
85 (build-system gnu-build-system)
86 (synopsis "Development kit for the YubiKey authentication device")
88 "This package contains a C library and command-line tools that make up
89 the low-level development kit for the Yubico YubiKey authentication device.")
90 (home-page "https://developers.yubico.com/yubico-c/")
91 (license license:bsd-2)))
93 (define-public pcsc-lite
100 "https://alioth.debian.org/frs/download.php/file/4203/"
101 "pcsc-lite-" version ".tar.bz2"))
104 "1ckb0jf4n585a4j26va3jm2nrv3c1y38974514f8qy3c04a02zgc"))))
105 (build-system gnu-build-system)
107 `(#:configure-flags '("--enable-usbdropdir=/var/lib/pcsc/drivers")))
109 `(("perl" ,perl) ; for pod2man
110 ("pkg-config" ,pkg-config)))
112 `(("libudev" ,eudev)))
113 (home-page "https://pcsclite.alioth.debian.org/pcsclite.html")
114 (synopsis "Middleware to access a smart card using PC/SC")
116 "pcsc-lite provides an interface to communicate with smartcards and
117 readers using the SCard API. pcsc-lite is used to connect to the PC/SC daemon
118 from a client application and provide access to the desired reader.")
119 (license (list license:bsd-3 ; pcsc-lite
120 license:expat ; src/sd-daemon.[ch]
121 license:isc ; src/strlcat.c src/strlcpy.c
122 license:gpl3+)))) ; src/spy/*
124 (define-public ykclient
131 "https://developers.yubico.com/yubico-c-client/Releases/"
132 name "-" version ".tar.gz"))
135 "05jhx9waj3pl120ddnwap1v3bjrnbfhvf3lxs2xmhpcmwzpwsqgl"))))
136 (build-system gnu-build-system)
138 ;; There's just one test, and it requires network access to access
139 ;; yubico.com, so skip it.
140 (arguments '(#:tests? #f))
142 (native-inputs `(("pkg-config" ,pkg-config)
143 ("help2man" ,help2man)))
144 (inputs `(("curl" ,curl)))
145 (synopsis "C library to validate one-time-password YubiKeys")
147 "YubiKey C Client Library (libykclient) is a C library used to validate a
148 one-time-password (OTP) YubiKey against Yubico’s servers. See the Yubico
149 website for more information about Yubico and the YubiKey.")
150 (home-page "https://developers.yubico.com/yubico-c-client/")
151 (license license:bsd-2)))