gnu: OpenSSH: Update to 7.9p1.
[jackhill/guix/guix.git] / gnu / packages / authentication.scm
CommitLineData
b3543e6c
TGR
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
3;;;
4;;; This file is part of GNU Guix.
5;;;
6;;; GNU Guix is free software; you can redistribute it and/or modify it
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
11;;; GNU Guix is distributed in the hope that it will be useful, but
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19(define-module (gnu packages authentication)
20 #:use-module (gnu packages linux)
21 #:use-module (gnu packages pkg-config)
22 #:use-module (guix build-system gnu)
23 #:use-module (guix download)
24 #:use-module ((guix licenses) #:prefix license:)
25 #:use-module (guix packages))
26
27(define-public oath-toolkit
28 ;; If gcc@7 breaks this package before its next release, try patching it:
29 ;; <https://gitlab.com/oath-toolkit/oath-toolkit/issues/2#note_52958748>.
30 (package
31 (name "oath-toolkit")
32 (version "2.6.2")
33 (source
34 (origin
35 (method url-fetch)
36 (uri (string-append "https://download.savannah.nongnu.org/releases/"
37 name "/" name "-" version ".tar.gz"))
38 (sha256
39 (base32 "182ah8vfbg0yhv6mh1b6ap944d0na6x7lpfkwkmzb6jl9gx4cd5h"))))
40 (build-system gnu-build-system)
41 (arguments
42 ;; TODO ‘--enable-pskc’ causes xmlsec-related test suite failures.
43 `(#:configure-flags
44 (list "--enable-pam")
45 #:phases
46 (modify-phases %standard-phases
47 (add-after 'install 'delete-static-libraries
48 (lambda* (#:key outputs #:allow-other-keys)
49 (let* ((out (assoc-ref outputs "out"))
50 (lib (string-append out "/lib")))
51 (for-each delete-file (find-files lib "\\.a$"))
52 #t))))))
53 (native-inputs
54 `(("pkg-config" ,pkg-config)))
55 (inputs
56 `(("linux-pam" ,linux-pam))) ; for --enable-pam
57 (home-page "https://www.nongnu.org/oath-toolkit/")
58 (synopsis "One-time password (OTP) components")
59 ;; TODO Add the following items after they've been enabled.
60 ;; @item @command{pskctool}, a command-line tool for manipulating secret key
61 ;; files in the Portable Symmetric Key Container (@dfn{PSKC}) format
62 ;; described in RFC6030.
63 ;; @item @code{libpskc}, a shared and static C library for PSKC handling.
64 (description
65 "The @dfn{OATH} (Open AuTHentication) Toolkit provides various components
66for building one-time password (@dfn{OTP}) authentication systems:
67
68@itemize
69@item @command{oathtool}, a command-line tool for generating & validating OTPs.
70@item @code{liboath}, a C library for OATH handling.
71@item @code{pam_oath}, a PAM module for pluggable login authentication.
72@end itemize
73
74Supported technologies include the event-based @dfn{HOTP} algorithm (RFC4226)
75and the time-based @dfn{TOTP} algorithm (RFC6238).")
76 (license (list license:lgpl2.1+ ; the libraries (liboath/ & libpskc/)
77 license:gpl3+)))) ; the tools (everything else)