-
Notifications
You must be signed in to change notification settings - Fork 29
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
Malformed certificates in version 1.2.5 #341
Comments
Mentioned earlier certificate is of course perfectly ok -it is not malformed. |
Hi, You could also try running the application through the terminal with |
Steps to reproduce
Import certificate to any of the slot in version 1.2.4 from PKCS#12 file and try to see this certificate in version 1.2.5
there should be some details from certificate visible - however only "Malformed certificate" is visible
Expected result
Certificate details should be visible
[What did you expect to happen when you did the above?]
Application should work in the same way as version 1.2.4 in this area.
Actual results
[What actually happened?]
Other info
when trying to export such malformed certificate - following is printed on linux terminal :
msilewicz@zenbook:~/Pobrane$ ./yubikey-manager-qt-1.2.5-linux.AppImage
Uncaught exception
Traceback (most recent call last):
File "/tmp/.mount_yubike1yasMa/usr/lib/python3.11/site-packages/yubikit/piv.py", line 723, in get_certificate
return x509.load_der_x509_certificate(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/.mount_yubike1yasMa/usr/lib/python3.11/site-packages/cryptography/x509/base.py", line 562, in load_der_x509_certificate
return rust_x509.load_der_x509_certificate(data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: error parsing asn1 value: ParseError { kind: EncodedDefault, location: ["RawCertificate::tbs_cert", "TbsCertificate::extensions", 0, "Extension::critical"] }
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 812, in piv_export_certificate
cert = session.get_certificate(SLOT[slot])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/.mount_yubike1yasMa/usr/lib/python3.11/site-packages/yubikit/piv.py", line 727, in get_certificate
raise BadResponseError("Invalid certificate", e)
yubikit.core.BadResponseError: ('Invalid certificate', ValueError('error parsing asn1 value: ParseError { kind: EncodedDefault, location: ["RawCertificate::tbs_cert", "TbsCertificate::extensions", 0, "Extension::critical"] }'))
qml: Unmapped error: null ('Invalid certificate', ValueError('error parsing asn1 value: ParseError { kind: EncodedDefault, location: ["RawCertificate::tbs_cert", "TbsCertificate::extensions", 0, "Extension::critical"] }'))
The text was updated successfully, but these errors were encountered: