pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/security/py-yubikey-manager



Module Name:    pkgsrc
Committed By:   riastradh
Date:           Tue Aug 18 13:37:50 UTC 2020

Modified Files:
        pkgsrc/security/py-yubikey-manager: Makefile distinfo
        pkgsrc/security/py-yubikey-manager/patches: patch-ykman_descriptor.py

Log Message:
security/py-yubikey-manager: Avoid crash on NetBSD for non-CCID keys.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 pkgsrc/security/py-yubikey-manager/Makefile \
    pkgsrc/security/py-yubikey-manager/distinfo
cvs rdiff -u -r1.1 -r1.2 \
    pkgsrc/security/py-yubikey-manager/patches/patch-ykman_descriptor.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/security/py-yubikey-manager/Makefile
diff -u pkgsrc/security/py-yubikey-manager/Makefile:1.1 pkgsrc/security/py-yubikey-manager/Makefile:1.2
--- pkgsrc/security/py-yubikey-manager/Makefile:1.1     Mon Aug 17 07:02:25 2020
+++ pkgsrc/security/py-yubikey-manager/Makefile Tue Aug 18 13:37:50 2020
@@ -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
Index: pkgsrc/security/py-yubikey-manager/distinfo
diff -u pkgsrc/security/py-yubikey-manager/distinfo:1.1 pkgsrc/security/py-yubikey-manager/distinfo:1.2
--- pkgsrc/security/py-yubikey-manager/distinfo:1.1     Mon Aug 17 07:02:25 2020
+++ pkgsrc/security/py-yubikey-manager/distinfo Tue Aug 18 13:37:50 2020
@@ -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

Index: pkgsrc/security/py-yubikey-manager/patches/patch-ykman_descriptor.py
diff -u pkgsrc/security/py-yubikey-manager/patches/patch-ykman_descriptor.py:1.1 pkgsrc/security/py-yubikey-manager/patches/patch-ykman_descriptor.py:1.2
--- pkgsrc/security/py-yubikey-manager/patches/patch-ykman_descriptor.py:1.1    Mon Aug 17 07:02:25 2020
+++ pkgsrc/security/py-yubikey-manager/patches/patch-ykman_descriptor.py        Tue Aug 18 13:37:50 2020
@@ -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