Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Management Key won't generate on M1. #316

Open
sethf200 opened this issue Dec 19, 2021 · 1 comment
Open

Management Key won't generate on M1. #316

sethf200 opened this issue Dec 19, 2021 · 1 comment

Comments

@sethf200
Copy link

  • YubiKey Manager (ykman) version: 1.2.4
  • How was it installed?: Downloaded from yubico.com.
  • Operating system and version: MacOS Monterey 12.0.1
  • YubiKey model and version: YubiKey5C 5.2.7
  • Bug description summary:
    Cannot create new Management Key in Yubikey Manager.

I was trying to create a new Management key, it kept giving me an error so I dug deeper and it looks like it's an architecture issue. It's saying a file is for arm64 when it needs x86_64. I'll put the logs below.

2021-12-18T19:52:13-0500 ERROR [yubikey.wrapped:80] Uncaught exception
Traceback (most recent call last):
File "qrc:///py/yubikey.py", line 68, in wrapped
return f(*args, **kwargs)
File "qrc:///py/yubikey.py", line 624, in piv_change_mgm_key
auth_failed = self._piv_ensure_authenticated(
File "qrc:///py/yubikey.py", line 797, in _piv_ensure_authenticated
session.authenticate(
File "/Applications/YubiKey Manager.app/Contents/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/yubikit/piv.py", line 493, in authenticate
backend = default_backend()
File "/Applications/YubiKey Manager.app/Contents/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/cryptography/hazmat/backends/init.py", line 14, in default_backend
from cryptography.hazmat.backends.openssl.backend import backend
File "/Applications/YubiKey Manager.app/Contents/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/cryptography/hazmat/backends/openssl/init.py", line 6, in
from cryptography.hazmat.backends.openssl.backend import backend
File "/Applications/YubiKey Manager.app/Contents/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/cryptography/hazmat/backends/openssl/backend.py", line 113, in
from cryptography.hazmat.bindings.openssl import binding
File "/Applications/YubiKey Manager.app/Contents/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 14, in
from cryptography.hazmat.bindings._openssl import ffi, lib
ImportError: dlopen(/Users/username/Library/Python/3.9/lib/python/site-packages/_cffi_backend.cpython-39-darwin.so, 0x0002): tried: '/Users/username/Library/Python/3.9/lib/python/site-packages/_cffi_backend.cpython-39-darwin.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/lib/_cffi_backend.cpython-39-darwin.so' (no such file)
qml: Unmapped error: null dlopen(/Users/username/Library/Python/3.9/lib/python/site-packages/_cffi_backend.cpython-39-darwin.so, 0x0002): tried: '/Users/username/Library/Python/3.9/lib/python/site-packages/_cffi_backend.cpython-39-darwin.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/lib/_cffi_backend.cpython-39-darwin.so' (no such file)

@dainnilsson dainnilsson transferred this issue from Yubico/yubikey-manager Dec 20, 2021
@fdennis
Copy link
Contributor

fdennis commented Dec 21, 2021

Hi,
It looks like it is not using the bundled Python. You can see this from the path /Users/username/Library/Python/3.9, which is your own local Python. I am not sure what has caused this. Perhaps there is a PYTHONPATH or PYTHONHOME variable set?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants