diff options
author | riastradh <riastradh@pkgsrc.org> | 2020-08-17 07:02:25 +0000 |
---|---|---|
committer | riastradh <riastradh@pkgsrc.org> | 2020-08-17 07:02:25 +0000 |
commit | c9ecaed186c07ea756ac5e0fb76eeb0341ed396d (patch) | |
tree | dda387251329c79773693cf32394b5fcd9a3a6d1 /security | |
parent | 664e308049137d43aebe8318a46a5c07104e522a (diff) | |
download | pkgsrc-c9ecaed186c07ea756ac5e0fb76eeb0341ed396d.tar.gz |
Import yubikey-manager-3.1.1 as security/py-yubikey-manager
Yubico's Python library and command-line tool for managing Yubikeys.
Meta-package security/ykman gives a more obvious name, without any
Python package prefixing, for the ykman command-line tool package.
Diffstat (limited to 'security')
-rw-r--r-- | security/py-yubikey-manager/ALTERNATIVES | 1 | ||||
-rw-r--r-- | security/py-yubikey-manager/DESCR | 6 | ||||
-rw-r--r-- | security/py-yubikey-manager/Makefile | 31 | ||||
-rw-r--r-- | security/py-yubikey-manager/PLIST | 117 | ||||
-rw-r--r-- | security/py-yubikey-manager/distinfo | 8 | ||||
-rw-r--r-- | security/py-yubikey-manager/patches/patch-ykman_descriptor.py | 20 | ||||
-rw-r--r-- | security/py-yubikey-manager/patches/patch-ykman_driver__ccid.py | 23 | ||||
-rw-r--r-- | security/ykman/DESCR | 6 | ||||
-rw-r--r-- | security/ykman/Makefile | 20 | ||||
-rw-r--r-- | security/ykman/version.mk | 6 |
10 files changed, 238 insertions, 0 deletions
diff --git a/security/py-yubikey-manager/ALTERNATIVES b/security/py-yubikey-manager/ALTERNATIVES new file mode 100644 index 00000000000..696cf7a384e --- /dev/null +++ b/security/py-yubikey-manager/ALTERNATIVES @@ -0,0 +1 @@ +bin/ykman @PREFIX@/bin/ykman-@PYVERSSUFFIX@ diff --git a/security/py-yubikey-manager/DESCR b/security/py-yubikey-manager/DESCR new file mode 100644 index 00000000000..8cf8bf1ca79 --- /dev/null +++ b/security/py-yubikey-manager/DESCR @@ -0,0 +1,6 @@ +Use the YubiKey Manager to configure FIDO2, OTP and PIV functionality +on your YubiKey on Windows, macOS, and Linux operating systems. The +tool works with any currently supported YubiKey. You can also use the +tool to check the type and firmware of a YubiKey. In addition, you can +use the extended settings to specify other features, such as to +configure 3-second long touch. diff --git a/security/py-yubikey-manager/Makefile b/security/py-yubikey-manager/Makefile new file mode 100644 index 00000000000..5e649128232 --- /dev/null +++ b/security/py-yubikey-manager/Makefile @@ -0,0 +1,31 @@ +# $NetBSD: Makefile,v 1.1 2020/08/17 07:02:25 riastradh Exp $ + +.include "../../security/ykman/version.mk" + +DISTNAME= yubikey-manager-${VERSION} +PKGNAME= ${PYPKGPREFIX}-${DISTNAME} +CATEGORIES= security sysutils +MASTER_SITES= ${MASTER_SITE_GITHUB:=Yubico/} +GITHUB_PROJECT= yubikey-manager +GITHUB_TAG= ${DISTNAME} + +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= https://developers.yubico.com/yubikey-manager/ +COMMENT= Yubico YubiKey manager library +LICENSE= 2-clause-bsd + +DEPENDS+= ${PYPKGPREFIX}-OpenSSL>=0:../../security/py-OpenSSL +DEPENDS+= ${PYPKGPREFIX}-click>=0:../../devel/py-click +DEPENDS+= ${PYPKGPREFIX}-cryptography>=0:../../security/py-cryptography +DEPENDS+= ${PYPKGPREFIX}-fido2>=0:../../security/py-fido2 +DEPENDS+= ${PYPKGPREFIX}-scard>=0:../../devel/py-scard +DEPENDS+= ${PYPKGPREFIX}-six>=0:../../lang/py-six +DEPENDS+= ${PYPKGPREFIX}-usb>=0:../../devel/py-usb + +post-install: + cd ${DESTDIR}${PREFIX}/bin && \ + ${MV} ykman ykman-${PYVERSSUFFIX} + +.include "../../lang/python/egg.mk" +.include "../../security/ykpers/buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/security/py-yubikey-manager/PLIST b/security/py-yubikey-manager/PLIST new file mode 100644 index 00000000000..a64e854a3f7 --- /dev/null +++ b/security/py-yubikey-manager/PLIST @@ -0,0 +1,117 @@ +@comment $NetBSD: PLIST,v 1.1 2020/08/17 07:02:25 riastradh Exp $ +bin/ykman-${PYVERSSUFFIX} +${PYSITELIB}/ykman/VERSION +${PYSITELIB}/ykman/__init__.py +${PYSITELIB}/ykman/__init__.pyc +${PYSITELIB}/ykman/__init__.pyo +${PYSITELIB}/ykman/cli/__init__.py +${PYSITELIB}/ykman/cli/__init__.pyc +${PYSITELIB}/ykman/cli/__init__.pyo +${PYSITELIB}/ykman/cli/__main__.py +${PYSITELIB}/ykman/cli/__main__.pyc +${PYSITELIB}/ykman/cli/__main__.pyo +${PYSITELIB}/ykman/cli/config.py +${PYSITELIB}/ykman/cli/config.pyc +${PYSITELIB}/ykman/cli/config.pyo +${PYSITELIB}/ykman/cli/fido.py +${PYSITELIB}/ykman/cli/fido.pyc +${PYSITELIB}/ykman/cli/fido.pyo +${PYSITELIB}/ykman/cli/info.py +${PYSITELIB}/ykman/cli/info.pyc +${PYSITELIB}/ykman/cli/info.pyo +${PYSITELIB}/ykman/cli/mode.py +${PYSITELIB}/ykman/cli/mode.pyc +${PYSITELIB}/ykman/cli/mode.pyo +${PYSITELIB}/ykman/cli/oath.py +${PYSITELIB}/ykman/cli/oath.pyc +${PYSITELIB}/ykman/cli/oath.pyo +${PYSITELIB}/ykman/cli/opgp.py +${PYSITELIB}/ykman/cli/opgp.pyc +${PYSITELIB}/ykman/cli/opgp.pyo +${PYSITELIB}/ykman/cli/otp.py +${PYSITELIB}/ykman/cli/otp.pyc +${PYSITELIB}/ykman/cli/otp.pyo +${PYSITELIB}/ykman/cli/piv.py +${PYSITELIB}/ykman/cli/piv.pyc +${PYSITELIB}/ykman/cli/piv.pyo +${PYSITELIB}/ykman/cli/util.py +${PYSITELIB}/ykman/cli/util.pyc +${PYSITELIB}/ykman/cli/util.pyo +${PYSITELIB}/ykman/descriptor.py +${PYSITELIB}/ykman/descriptor.pyc +${PYSITELIB}/ykman/descriptor.pyo +${PYSITELIB}/ykman/device.py +${PYSITELIB}/ykman/device.pyc +${PYSITELIB}/ykman/device.pyo +${PYSITELIB}/ykman/driver.py +${PYSITELIB}/ykman/driver.pyc +${PYSITELIB}/ykman/driver.pyo +${PYSITELIB}/ykman/driver_ccid.py +${PYSITELIB}/ykman/driver_ccid.pyc +${PYSITELIB}/ykman/driver_ccid.pyo +${PYSITELIB}/ykman/driver_fido.py +${PYSITELIB}/ykman/driver_fido.pyc +${PYSITELIB}/ykman/driver_fido.pyo +${PYSITELIB}/ykman/driver_otp.py +${PYSITELIB}/ykman/driver_otp.pyc +${PYSITELIB}/ykman/driver_otp.pyo +${PYSITELIB}/ykman/fido.py +${PYSITELIB}/ykman/fido.pyc +${PYSITELIB}/ykman/fido.pyo +${PYSITELIB}/ykman/logging_setup.py +${PYSITELIB}/ykman/logging_setup.pyc +${PYSITELIB}/ykman/logging_setup.pyo +${PYSITELIB}/ykman/native/__init__.py +${PYSITELIB}/ykman/native/__init__.pyc +${PYSITELIB}/ykman/native/__init__.pyo +${PYSITELIB}/ykman/native/libloader.py +${PYSITELIB}/ykman/native/libloader.pyc +${PYSITELIB}/ykman/native/libloader.pyo +${PYSITELIB}/ykman/native/pyusb.py +${PYSITELIB}/ykman/native/pyusb.pyc +${PYSITELIB}/ykman/native/pyusb.pyo +${PYSITELIB}/ykman/native/util.py +${PYSITELIB}/ykman/native/util.pyc +${PYSITELIB}/ykman/native/util.pyo +${PYSITELIB}/ykman/native/ykpers.py +${PYSITELIB}/ykman/native/ykpers.pyc +${PYSITELIB}/ykman/native/ykpers.pyo +${PYSITELIB}/ykman/oath.py +${PYSITELIB}/ykman/oath.pyc +${PYSITELIB}/ykman/oath.pyo +${PYSITELIB}/ykman/opgp.py +${PYSITELIB}/ykman/opgp.pyc +${PYSITELIB}/ykman/opgp.pyo +${PYSITELIB}/ykman/otp.py +${PYSITELIB}/ykman/otp.pyc +${PYSITELIB}/ykman/otp.pyo +${PYSITELIB}/ykman/piv.py +${PYSITELIB}/ykman/piv.pyc +${PYSITELIB}/ykman/piv.pyo +${PYSITELIB}/ykman/scancodes/__init__.py +${PYSITELIB}/ykman/scancodes/__init__.pyc +${PYSITELIB}/ykman/scancodes/__init__.pyo +${PYSITELIB}/ykman/scancodes/de.py +${PYSITELIB}/ykman/scancodes/de.pyc +${PYSITELIB}/ykman/scancodes/de.pyo +${PYSITELIB}/ykman/scancodes/modhex.py +${PYSITELIB}/ykman/scancodes/modhex.pyc +${PYSITELIB}/ykman/scancodes/modhex.pyo +${PYSITELIB}/ykman/scancodes/norman.py +${PYSITELIB}/ykman/scancodes/norman.pyc +${PYSITELIB}/ykman/scancodes/norman.pyo +${PYSITELIB}/ykman/scancodes/us.py +${PYSITELIB}/ykman/scancodes/us.pyc +${PYSITELIB}/ykman/scancodes/us.pyo +${PYSITELIB}/ykman/settings.py +${PYSITELIB}/ykman/settings.pyc +${PYSITELIB}/ykman/settings.pyo +${PYSITELIB}/ykman/util.py +${PYSITELIB}/ykman/util.pyc +${PYSITELIB}/ykman/util.pyo +${PYSITELIB}/${EGG_INFODIR}/PKG-INFO +${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt +${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt +${PYSITELIB}/${EGG_INFODIR}/entry_points.txt +${PYSITELIB}/${EGG_INFODIR}/requires.txt +${PYSITELIB}/${EGG_INFODIR}/top_level.txt diff --git a/security/py-yubikey-manager/distinfo b/security/py-yubikey-manager/distinfo new file mode 100644 index 00000000000..3ddffa4c210 --- /dev/null +++ b/security/py-yubikey-manager/distinfo @@ -0,0 +1,8 @@ +$NetBSD: distinfo,v 1.1 2020/08/17 07:02:25 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_driver__ccid.py) = ff238fe8fd67dd0bbe14f6afbebffd19c0de270b diff --git a/security/py-yubikey-manager/patches/patch-ykman_descriptor.py b/security/py-yubikey-manager/patches/patch-ykman_descriptor.py new file mode 100644 index 00000000000..436b0395d81 --- /dev/null +++ b/security/py-yubikey-manager/patches/patch-ykman_descriptor.py @@ -0,0 +1,20 @@ +$NetBSD: patch-ykman_descriptor.py,v 1.1 2020/08/17 07:02:25 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 +@@ -145,6 +145,13 @@ def _gen_descriptors(): + desc = Descriptor.from_usb(dev, backend) + if desc: + yield desc ++ # No generic USB devices found, but there may be some USB HID ++ # devices available only as such and not as generic USB devices. ++ if not found: ++ for d in _list_drivers(TRANSPORT.OTP | TRANSPORT.FIDO): ++ desc = Descriptor.from_driver(d) ++ if desc: ++ yield desc + + + def get_descriptors(): diff --git a/security/py-yubikey-manager/patches/patch-ykman_driver__ccid.py b/security/py-yubikey-manager/patches/patch-ykman_driver__ccid.py new file mode 100644 index 00000000000..4f24ca1b561 --- /dev/null +++ b/security/py-yubikey-manager/patches/patch-ykman_driver__ccid.py @@ -0,0 +1,23 @@ +$NetBSD: patch-ykman_driver__ccid.py,v 1.1 2020/08/17 07:02:25 riastradh Exp $ + +Avoid crashing if pcscd is missing. + +--- ykman/driver_ccid.py.orig 2020-01-29 07:32:03.000000000 +0000 ++++ ykman/driver_ccid.py +@@ -36,6 +36,7 @@ from enum import IntEnum, unique + from binascii import b2a_hex + from smartcard import System + from smartcard.Exceptions import CardConnectionException ++from smartcard.pcsc.PCSCExceptions import EstablishContextException + from smartcard.pcsc.PCSCExceptions import ListReadersException + from smartcard.pcsc.PCSCContext import PCSCContext + from .driver import AbstractDriver, ModeSwitchError, NotSupportedError +@@ -320,6 +321,8 @@ def list_readers(): + # removed): + PCSCContext.instance = None + return System.readers() ++ except EstablishContextException: ++ return [] + + + def open_devices(name_filter=YK_READER_NAME): diff --git a/security/ykman/DESCR b/security/ykman/DESCR new file mode 100644 index 00000000000..8cf8bf1ca79 --- /dev/null +++ b/security/ykman/DESCR @@ -0,0 +1,6 @@ +Use the YubiKey Manager to configure FIDO2, OTP and PIV functionality +on your YubiKey on Windows, macOS, and Linux operating systems. The +tool works with any currently supported YubiKey. You can also use the +tool to check the type and firmware of a YubiKey. In addition, you can +use the extended settings to specify other features, such as to +configure 3-second long touch. diff --git a/security/ykman/Makefile b/security/ykman/Makefile new file mode 100644 index 00000000000..921b43624aa --- /dev/null +++ b/security/ykman/Makefile @@ -0,0 +1,20 @@ +# $NetBSD: Makefile,v 1.1 2020/08/17 07:02:25 riastradh Exp $ + +.include "../../security/ykman/version.mk" + +PKGNAME= ykman-${VERSION} +CATEGORIES= security +MASTER_SITES= # empty +DISTFILES= # empty + +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= https://developers.yubico.com/yubikey-manager/ +COMMENT= Yubico YubiKey manager command-line tool +LICENSE= 2-clause-bsd + +DEPENDS+= ${PYPKGPREFIX}-yubikey-manager>=${VERSION}:../../security/py-yubikey-manager + +META_PACKAGE= yes + +.include "../../lang/python/pyversion.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/security/ykman/version.mk b/security/ykman/version.mk new file mode 100644 index 00000000000..bcb81204029 --- /dev/null +++ b/security/ykman/version.mk @@ -0,0 +1,6 @@ +# $NetBSD: version.mk,v 1.1 2020/08/17 07:02:25 riastradh Exp $ + +# used by security/py-yubikey-manager/Makefile +# used by security/ykman/Makefile + +VERSION= 3.1.1 |