From 88e07ddbaa5a10ba7730edb34ecb3cd80679b1e3 Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Thu, 11 Feb 2021 20:37:15 +0000 Subject: [PATCH] avoid warnings about cryptography int_from_bytes --- src/gam/auth/yubikey.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gam/auth/yubikey.py b/src/gam/auth/yubikey.py index 42479553..f6ea2ad5 100644 --- a/src/gam/auth/yubikey.py +++ b/src/gam/auth/yubikey.py @@ -7,6 +7,12 @@ class fake_open(): sys.modules['ykman.driver_otp'] = fake_open import ykman.descriptor + +# hack to avoid deprecation notice from cryptography +# remove after this lands: +# https://github.com/Yubico/yubikey-manager/pull/385 +sys.modules['ykman.utils.int_from_bytes'] = int.from_bytes + from ykman.piv import SLOT, ALGO, PivController, DEFAULT_MANAGEMENT_KEY from ykman.util import TRANSPORT