Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/security/py-yubikey-manager security/py-yubikey-manage...
details: https://anonhg.NetBSD.org/pkgsrc/rev/0d7e12b4e7fa
branches: trunk
changeset: 437203:0d7e12b4e7fa
user: riastradh <riastradh%pkgsrc.org@localhost>
date: Tue Aug 18 13:37:50 2020 +0000
description:
security/py-yubikey-manager: Avoid crash on NetBSD for non-CCID keys.
diffstat:
security/py-yubikey-manager/Makefile | 3 +-
security/py-yubikey-manager/distinfo | 4 +-
security/py-yubikey-manager/patches/patch-ykman_descriptor.py | 25 +++++++++-
3 files changed, 26 insertions(+), 6 deletions(-)
diffs (65 lines):
diff -r 00be6bd113b2 -r 0d7e12b4e7fa security/py-yubikey-manager/Makefile
--- a/security/py-yubikey-manager/Makefile Tue Aug 18 13:10:03 2020 +0000
+++ b/security/py-yubikey-manager/Makefile Tue Aug 18 13:37:50 2020 +0000
@@ -1,9 +1,10 @@
-# $NetBSD: Makefile,v 1.1 2020/08/17 07:02:25 riastradh Exp $
+# $NetBSD: Makefile,v 1.2 2020/08/18 13:37:50 riastradh Exp $
.include "../../security/ykman/version.mk"
DISTNAME= yubikey-manager-${VERSION}
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
+PKGREVISION= 1
CATEGORIES= security sysutils
MASTER_SITES= ${MASTER_SITE_GITHUB:=Yubico/}
GITHUB_PROJECT= yubikey-manager
diff -r 00be6bd113b2 -r 0d7e12b4e7fa security/py-yubikey-manager/distinfo
--- a/security/py-yubikey-manager/distinfo Tue Aug 18 13:10:03 2020 +0000
+++ b/security/py-yubikey-manager/distinfo Tue Aug 18 13:37:50 2020 +0000
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.1 2020/08/17 07:02:25 riastradh Exp $
+$NetBSD: distinfo,v 1.2 2020/08/18 13:37:50 riastradh Exp $
SHA1 (yubikey-manager-3.1.1.tar.gz) = 6f93f6534ad681b9092edf1f28dd970aed964114
RMD160 (yubikey-manager-3.1.1.tar.gz) = 927cb522b894dd4824c92b2d0d59385a74800243
SHA512 (yubikey-manager-3.1.1.tar.gz) = 4c1516c9fb72bae5f046f32220403504b3b34bce503abc50597c13cc0f29eb7673b8520d580f7bdd31120adfd4cfef8a91f3bb42bdafc517836952d7f5bb6ad9
Size (yubikey-manager-3.1.1.tar.gz) = 119251 bytes
-SHA1 (patch-ykman_descriptor.py) = 0173d6c596d424c4660def6d78bd5b7c8a6e2088
+SHA1 (patch-ykman_descriptor.py) = aaf79848fb17f3426b7d12d9b3fb40007d8774ee
SHA1 (patch-ykman_driver__ccid.py) = ff238fe8fd67dd0bbe14f6afbebffd19c0de270b
diff -r 00be6bd113b2 -r 0d7e12b4e7fa security/py-yubikey-manager/patches/patch-ykman_descriptor.py
--- a/security/py-yubikey-manager/patches/patch-ykman_descriptor.py Tue Aug 18 13:10:03 2020 +0000
+++ b/security/py-yubikey-manager/patches/patch-ykman_descriptor.py Tue Aug 18 13:37:50 2020 +0000
@@ -1,10 +1,29 @@
-$NetBSD: patch-ykman_descriptor.py,v 1.1 2020/08/17 07:02:25 riastradh Exp $
+$NetBSD: patch-ykman_descriptor.py,v 1.2 2020/08/18 13:37:50 riastradh Exp $
Enumerate uhidevs in case they are not available as ugen.
---- ykman/descriptor.py.orig 2020-08-17 06:36:13.378751569 +0000
+--- ykman/descriptor.py.orig 2020-01-29 07:32:03.000000000 +0000
+++ ykman/descriptor.py
-@@ -145,6 +145,13 @@ def _gen_descriptors():
+@@ -75,6 +75,8 @@ class Descriptor(object):
+
+ @property
+ def name(self):
++ if self.version is None:
++ return self.key_type.value
+ if self.key_type == YUBIKEY.SKY and self.version < (5, 0, 0):
+ return 'FIDO U2F Security Key'
+ elif self.key_type == YUBIKEY.YK4 and self.version >= (5, 0, 0):
+@@ -132,7 +134,8 @@ class Descriptor(object):
+ @classmethod
+ def from_driver(cls, driver):
+ fp = (driver.key_type, driver.mode)
+- return cls(driver.key_type, driver.mode, None, fp)
++ version = driver.read_version()
++ return cls(driver.key_type, driver.mode, version, fp)
+
+
+ def _gen_descriptors():
+@@ -145,6 +148,13 @@ def _gen_descriptors():
desc = Descriptor.from_usb(dev, backend)
if desc:
yield desc
Home |
Main Index |
Thread Index |
Old Index