From patchwork Sat Apr 20 01:07:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Marusich X-Patchwork-Id: 9596 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 639B716ECD; Sat, 20 Apr 2019 02:09:10 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id D23B716EA1 for ; Sat, 20 Apr 2019 02:09:09 +0100 (BST) Received: from localhost ([127.0.0.1]:35151 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHeVB-0001AN-Di for patchwork@mira.cbaines.net; Fri, 19 Apr 2019 21:09:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37485) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHeV8-000189-Im for guix-patches@gnu.org; Fri, 19 Apr 2019 21:09:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hHeV7-0003eX-7r for guix-patches@gnu.org; Fri, 19 Apr 2019 21:09:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59808) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hHeV6-0003dy-W9 for guix-patches@gnu.org; Fri, 19 Apr 2019 21:09:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hHeV6-0006bL-Pl for guix-patches@gnu.org; Fri, 19 Apr 2019 21:09:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#35333] [PATCH 5/6] gnu: Add python-fido2 and python2-fido2. Resent-From: Chris Marusich Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 20 Apr 2019 01:09:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35333 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 35333@debbugs.gnu.org Received: via spool by 35333-submit@debbugs.gnu.org id=B35333.155572252625296 (code B ref 35333); Sat, 20 Apr 2019 01:09:04 +0000 Received: (at 35333) by debbugs.gnu.org; 20 Apr 2019 01:08:46 +0000 Received: from localhost ([127.0.0.1]:45110 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hHeUo-0006Zq-0d for submit@debbugs.gnu.org; Fri, 19 Apr 2019 21:08:46 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:43072) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hHeUh-0006Yi-MT for 35333@debbugs.gnu.org; Fri, 19 Apr 2019 21:08:40 -0400 Received: by mail-pg1-f195.google.com with SMTP id z9so3296514pgu.10 for <35333@debbugs.gnu.org>; Fri, 19 Apr 2019 18:08:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KgnaG3XGCXkPBCB/oew0HKjo8BYCUOkmXTZPW+KAsxw=; b=ewvTFJPI8xrhNkaHbAD16TtXFysUqZjPpGwQHJCLC2LGPjf7tQT43ydKIhmDmMYzl+ OF4Hi6K3PQRyJYWEwN5e4x88KKpc6rljLzntN8hF+Lxdr1dUWQYOid9pGf0+2NahhMic xh/5L5rXAksmAP4Z2iZhpp7cXtYkpfu/uBnt+eTkxu/oJaU9L38xwHhMnneyWyPeWNoI U3wNlSpJlnEXDnCIDMJD7X0c6NT77OOJpRjJOCrTcfM04H9n2R+PIX7GT/vv2VFNLK4D +0Q31FcuMk31yN7zOOglSLVAQjXm+nxH4IwF6NSc/6nrfn14hNYp7C1KPdbFaPkSHPVS tqDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KgnaG3XGCXkPBCB/oew0HKjo8BYCUOkmXTZPW+KAsxw=; b=l+oSgXrddf+D7IjJ+XiSBcUDp2fHACUXv8GCoTDCk1wzA0NgnW3lYXEJemZPoGKq/A i+NptpaMOzYuzd8vLL5jLdTTywSDz3w/6J3JnXQQuryk4wpYcxkvLJggHibqwZcZOSpT eXX5/1orWgv644PWPPh5XJk1/T/AKlP3vGAM7ivCnr4/A3SNuXmA4GYpdoEPt9RRFweL wVTCSiAw3mjpxzTxwPyhB8Mah5T3QcdrJJitPcOdgOn+YEBSPMW5YCPiww8fJF+c99Tl bmGUgnIxa61K0NysH1n+IlduNxcoQWfqXAuP2uBmUlZb2FOip42H2+GwqwxWWsM47yYt wFjQ== X-Gm-Message-State: APjAAAUl8oBe98FT45idbZmHIT3tYmKt3bo8tvuvVlygas/4jqMNIB4Q eZzZvL0ozdF8J6MOKE/WN2UsvrVV X-Google-Smtp-Source: APXvYqxemxQNQSgkaL1OUw/dfrwtJ6OF/29kar8vL3n8Mmp6ZvVJre3/oOwdvrv8IFC93/GZ+q6trQ== X-Received: by 2002:a62:6c6:: with SMTP id 189mr7092904pfg.36.1555722513687; Fri, 19 Apr 2019 18:08:33 -0700 (PDT) Received: from garuda.lan ([2601:601:9d80:25b2::fa8]) by smtp.gmail.com with ESMTPSA id h16sm8876885pgj.85.2019.04.19.18.08.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Apr 2019 18:08:32 -0700 (PDT) From: Chris Marusich Date: Fri, 19 Apr 2019 18:07:59 -0700 Message-Id: <20190420010800.5741-6-cmmarusich@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190420010800.5741-1-cmmarusich@gmail.com> References: <20190420003814.5120-1-cmmarusich@gmail.com> <20190420010800.5741-1-cmmarusich@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chris Marusich Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/security-token.scm (python-fido2, python2-fido2): New variables. --- gnu/packages/security-token.scm | 61 +++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/gnu/packages/security-token.scm b/gnu/packages/security-token.scm index 26541b3d09..29c424d21d 100644 --- a/gnu/packages/security-token.scm +++ b/gnu/packages/security-token.scm @@ -29,6 +29,7 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (guix build-system glib-or-gtk) @@ -38,6 +39,7 @@ #:use-module (gnu packages check) #:use-module (gnu packages docbook) #:use-module (gnu packages documentation) + #:use-module (gnu packages dns) #:use-module (gnu packages gettext) #:use-module (gnu packages graphviz) #:use-module (gnu packages gtk) @@ -53,6 +55,8 @@ #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) + #:use-module (gnu packages python-crypto) + #:use-module (gnu packages python-xyz) #:use-module (gnu packages swig) #:use-module (gnu packages web) #:use-module (gnu packages xml)) @@ -449,3 +453,60 @@ talk to a U2F device and perform the U2F Register and U2F Authenticate operations.") ;; Most files are LGPLv2.1+, but some files are GPLv3+. (license (list license:lgpl2.1+ license:gpl3+)))) + +(define-public python-fido2 + (package + (name "python-fido2") + (version "0.5.0") + (source (origin + (method url-fetch) + (uri + (string-append + "https://github.com/Yubico/python-fido2/releases/download/" + version "/fido2-" version ".tar.gz")) + (sha256 + (base32 + "1pl8d2pr6jzqj4y9qiaddhjgnl92kikjxy0bgzm2jshkzzic8mp3")) + (snippet + ;; Remove bundled dependency. + #~(delete-file "fido2/public_suffix_list.dat")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'install-public-suffix-list + (lambda* (#:key inputs #:allow-other-keys) + (copy-file + (string-append (assoc-ref inputs "public-suffix-list") + "/share/public-suffix-list-" + ,(package-version public-suffix-list) + "/public_suffix_list.dat") + "fido2/public_suffix_list.dat") + #t))))) + (propagated-inputs + `(("python-cryptography" ,python-cryptography) + ("python-six" ,python-six))) + (native-inputs + `(("python-mock" ,python-mock) + ("python-pyfakefs" ,python-pyfakefs) + ("public-suffix-list" ,public-suffix-list))) + (home-page "https://github.com/Yubico/python-fido2") + (synopsis "Python library for communicating with FIDO devices over USB") + (description + "This Python library provides functionality for communicating with a Fast +IDentity Online (FIDO) device over Universal Serial Bus (USB) as well as +verifying attestation and assertion signatures. It aims to support the FIDO +Universal 2nd Factor (U2F) and FIDO 2.0 protocols for communicating with a USB +authenticator via the Client-to-Authenticator Protocol (CTAP 1 and 2). In +addition to this low-level device access, classes defined in the +@code{fido2.client} and @code{fido2.server} modules implement higher level +operations which are useful when interfacing with an Authenticator, or when +implementing a Relying Party.") + ;; python-fido2 contains some derivative files originally from pyu2f + ;; (https://github.com/google/pyu2f). These files are licensed under the + ;; Apache License, version 2.0. The maintainers have customized these + ;; files for internal use, so they are not really a bundled dependency. + (license (list license:bsd-2 license:asl2.0)))) + +(define-public python2-fido2 + (package-with-python2 python-fido2))