Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-fido2 for openSUSE:Factory checked in at 2021-05-07 16:45:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-fido2 (Old) and /work/SRC/openSUSE:Factory/.python-fido2.new.2988 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-fido2" Fri May 7 16:45:53 2021 rev:9 rq:891243 version:0.9.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-fido2/python-fido2.changes 2020-04-21 13:11:06.492865049 +0200 +++ /work/SRC/openSUSE:Factory/.python-fido2.new.2988/python-fido2.changes 2021-05-07 16:46:18.808176753 +0200 @@ -1,0 +2,21 @@ +Thu May 6 14:23:34 UTC 2021 - Ferdinand Thiessen <r...@fthiessen.de> + +- Update to version 0.9.1 + * Add new CTAP error codes and improve handling of unknown codes. + * Client: API changes to better support extensions. + * Client.make_credential now returns a AuthenticatorAttestationResponse, + which holds the AttestationObject and ClientData, as well as any + client extension results for the credential. + * Client.get_assertion now returns an AssertionSelection object, + which is used to select between multiple assertions + * Renames: The CTAP1 and CTAP2 classes have been renamed to + Ctap1 and Ctap2, respectively. + * ClientPin: The ClientPin API has been restructured to support + multiple PIN protocols, UV tokens, and token permissions. + * CTAP 2.1 PRE: Several new features have been added for CTAP 2.1 + * HID: The platform specific HID code has been revamped +- Add 0001-Don-t-use-enum.auto-Python-2.patch from upstream +- Add 0001-Skip-tests-on-older-Cryptography-versions.patch from + upstream + +------------------------------------------------------------------- Old: ---- fido2-0.8.1.tar.gz fido2-0.8.1.tar.gz.sig New: ---- 0001-Don-t-use-enum.auto-Python-2.patch 0001-Skip-tests-on-older-Cryptography-versions.patch fido2-0.9.1.tar.gz fido2-0.9.1.tar.gz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-fido2.spec ++++++ --- /var/tmp/diff_new_pack.Qu0fwe/_old 2021-05-07 16:46:19.300174524 +0200 +++ /var/tmp/diff_new_pack.Qu0fwe/_new 2021-05-07 16:46:19.304174506 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-fido2 # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,14 +19,18 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %bcond_without python2 Name: python-fido2 -Version: 0.8.1 +Version: 0.9.1 Release: 0 Summary: Python-based FIDO 2.0 library License: BSD-2-Clause AND BSD-3-Clause AND Apache-2.0 AND MPL-2.0 Group: Development/Languages/Python URL: https://github.com/Yubico/python-fido2 -Source0: https://github.com/Yubico/python-fido2/releases/download/%{version}/fido2-%{version}.tar.gz -Source1: https://github.com/Yubico/python-fido2/releases/download/%{version}/fido2-%{version}.tar.gz.sig +Source0: %{URL}/releases/download/%{version}/fido2-%{version}.tar.gz +Source1: %{URL}/releases/download/%{version}/fido2-%{version}.tar.gz.sig +# PATCH-FIX-UPSTREAM 0001-Don-t-use-enum.auto-Python-2.patch -- https://github.com/Yubico/python-fido2/commit/ce19ba598a077dd09d164c2bef05169e01b69eaf +Patch0: 0001-Don-t-use-enum.auto-Python-2.patch +# PATCH-FIX-UPSTREAM 0001-Skip-tests-on-older-Cryptography-versions.patch -- https://github.com/Yubico/python-fido2/commit/2e3224d7a8be8625b05e88c10efdbf57b646107c +Patch1: 0001-Skip-tests-on-older-Cryptography-versions.patch BuildRequires: %{python_module cryptography >= 1.5} BuildRequires: %{python_module mock >= 1.0.1} BuildRequires: %{python_module pyfakefs >= 3.4} @@ -52,7 +56,7 @@ implement higher level device operations. %prep -%setup -q -n fido2-%{version} +%autosetup -p1 -n fido2-%{version} %build %python_build @@ -62,7 +66,8 @@ %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -%python_exec setup.py test +# %%pyunittest +%python_expand $python -m unittest %files %{python_files} %doc NEWS* README* ++++++ 0001-Don-t-use-enum.auto-Python-2.patch ++++++ >From ce19ba598a077dd09d164c2bef05169e01b69eaf Mon Sep 17 00:00:00 2001 From: Dain Nilsson <d...@yubico.com> Date: Tue, 16 Mar 2021 14:59:59 +0100 Subject: [PATCH] Don't use enum.auto (Python 2). --- fido2/attestation/base.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fido2/attestation/base.py b/fido2/attestation/base.py index 6f7d173..e631c48 100644 --- a/fido2/attestation/base.py +++ b/fido2/attestation/base.py @@ -25,7 +25,7 @@ # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. -from enum import Enum, auto +from enum import Enum from cryptography import x509 from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.asymmetric import padding, ec, rsa @@ -67,11 +67,11 @@ AttestationResult = namedtuple("AttestationResult", ["attestation_type", "trust_ class AttestationType(Enum): - BASIC = auto() - SELF = auto() - ATT_CA = auto() - ANON_CA = auto() - NONE = auto + BASIC = 1 + SELF = 2 + ATT_CA = 3 + ANON_CA = 4 + NONE = 0 def catch_builtins(f): -- 2.26.2 ++++++ 0001-Skip-tests-on-older-Cryptography-versions.patch ++++++ >From 2e3224d7a8be8625b05e88c10efdbf57b646107c Mon Sep 17 00:00:00 2001 From: Dain Nilsson <d...@yubico.com> Date: Tue, 16 Feb 2021 08:41:30 +0100 Subject: [PATCH] Skip tests on older Cryptography versions. --- test/test_cose.py | 25 +++++++++++++------------ test/utils.py | 5 +++++ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/test/test_cose.py b/test/test_cose.py index 4ce0fd7..4ae0479 100644 --- a/test/test_cose.py +++ b/test/test_cose.py @@ -30,7 +30,8 @@ from __future__ import absolute_import, unicode_literals from fido2 import cbor from fido2.cose import CoseKey, ES256, RS256, EdDSA, UnsupportedKey -from cryptography.exceptions import UnsupportedAlgorithm +from cryptography import __version__ as cryptography_version +from distutils.version import LooseVersion from binascii import a2b_hex import unittest @@ -100,6 +101,9 @@ class TestCoseKey(unittest.TestCase): ) def test_EdDSA_parse_verify(self): + if LooseVersion(cryptography_version) < LooseVersion("2.6"): + self.skipTest("EdDSA support missing") + key = CoseKey.parse(cbor.decode(_EdDSA_KEY)) self.assertIsInstance(key, EdDSA) self.assertEqual( @@ -113,17 +117,14 @@ class TestCoseKey(unittest.TestCase): ), }, ) - try: - key.verify( - a2b_hex( - b"a379a6f6eeafb9a55e378c118034e2751e682fab9f2d30ab13d2125586ce1947010000000500a11a323057d1103784ddff99a354ddd42348c2f00e88d8977b916cabf92268" # noqa E501 - ), - a2b_hex( - b"e8c927ef1a57c738ff4ba8d6f90e06d837a5219eee47991f96b126b0685d512520c9c2eedebe4b88ff2de2b19cb5f8686efc7c4261e9ed1cb3ac5de50869be0a" # noqa E501 - ), - ) - except UnsupportedAlgorithm: - self.skipTest("EdDSA support missing") + key.verify( + a2b_hex( + b"a379a6f6eeafb9a55e378c118034e2751e682fab9f2d30ab13d2125586ce1947010000000500a11a323057d1103784ddff99a354ddd42348c2f00e88d8977b916cabf92268" # noqa E501 + ), + a2b_hex( + b"e8c927ef1a57c738ff4ba8d6f90e06d837a5219eee47991f96b126b0685d512520c9c2eedebe4b88ff2de2b19cb5f8686efc7c4261e9ed1cb3ac5de50869be0a" # noqa E501 + ), + ) def test_unsupported_key(self): key = CoseKey.parse({1: 4711, 3: 4712, -1: b"123", -2: b"456"}) diff --git a/test/utils.py b/test/utils.py index d649cb2..f50898d 100644 --- a/test/utils.py +++ b/test/utils.py @@ -1,4 +1,5 @@ import six +import unittest from binascii import a2b_hex from cryptography.hazmat.backends import default_backend @@ -17,8 +18,12 @@ class U2FDevice(object): ) def __init__(self, credential_id, app_id): + if not hasattr(serialization.Encoding, "X962"): + raise unittest.SkipTest("Requires Cryptography >= 2.5") + assert isinstance(credential_id, six.binary_type) assert isinstance(app_id, six.binary_type) + # Note: do not use in production, no garantees is provided this is # cryptographically safe to use. priv_key_params = ConcatKDFHash( -- 2.26.2 ++++++ fido2-0.8.1.tar.gz -> fido2-0.9.1.tar.gz ++++++ ++++ 12765 lines of diff (skipped)