You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 20, 2025. It is now read-only.
Bug description summary: Invalid password or PKCS12 data
Steps to reproduce
Generate a CSR, sign it, run openssl pkcs12 -export -out test.p12 -inkey test.key.pem -in ssl/newcerts/1000.pem -certfile ssl/cacert.pem
And then try to import the .p12 in ykman-gui.
Expected result
It appears to actually complete the import, as I have it loaded:
However the stacktrace below also happens.
Actual results
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/ykman/util.py", line 51, in _parse_pkcs12
key, cert, cas = pkcs12.load_key_and_certificates(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/cryptography/hazmat/primitives/serialization/pkcs12.py", line 157, in load_key_and_certificates
return ossl.load_key_and_certificates_from_pkcs12(data, password)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/cryptography/hazmat/backends/openssl/backend.py", line 1607, in load_key_and_certificates_from_pkcs12
pkcs12 = self.load_pkcs12(data, password)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/cryptography/hazmat/backends/openssl/backend.py", line 1636, in load_pkcs12
raise ValueError("Invalid password or PKCS12 data")
ValueError: Invalid password or PKCS12 data
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "qrc:///py/yubikey.py", line 78, in wrapped
return f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "qrc:///py/yubikey.py", line 749, in piv_can_parse
parse_certificates(data, password=None)
File "/usr/lib/python3.11/site-packages/ykman/util.py", line 129, in parse_certificates
return _parse_pkcs12(data, password)[1]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/ykman/util.py", line 58, in _parse_pkcs12
raise InvalidPasswordError(e)
ykman.util.InvalidPasswordError: Invalid password or PKCS12 data
Cannot convert: QVariant(std::nullptr_t, (nullptr))
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
pacman
Steps to reproduce
Generate a CSR, sign it, run
openssl pkcs12 -export -out test.p12 -inkey test.key.pem -in ssl/newcerts/1000.pem -certfile ssl/cacert.pem
And then try to import the .p12 in ykman-gui.
Expected result
It appears to actually complete the import, as I have it loaded:
![screenshot](https://private-user-images.githubusercontent.com/861439/294207014-870cb638-d79a-44aa-958a-fc8ec6a375e2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDAwNTUxNjEsIm5iZiI6MTc0MDA1NDg2MSwicGF0aCI6Ii84NjE0MzkvMjk0MjA3MDE0LTg3MGNiNjM4LWQ3OWEtNDRhYS05NThhLWZjOGVjNmEzNzVlMi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjIwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIyMFQxMjM0MjFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lZTBmMzk1NTIxNWYyY2EwMmVkZTFlNjQ1MWY4MmE2MjQzMjlkMmNiMWIzOTY0YTY2ZjIzOGQwMTllNGVlZDMwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.jGd5Fm7SOvQd1DWZHDq4rbYEkNlEq_yV4tEMAUCwGI4)
However the stacktrace below also happens.
Actual results
The text was updated successfully, but these errors were encountered: