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
$ python --version
Python 3.11.4
$ pip list
Package Version
------------ -------
cffi 1.15.1
cryptography 41.0.3
pip 23.2.1
pycparser 2.21
pyOpenSSL 23.2.0
setuptools 62.6.0
$ openssl version
OpenSSL 3.0.9 30 May 2023 (Library: OpenSSL 3.0.9 30 May 2023)
Possible Cause
The current call to X509V3_EXT_print() in crypto.X509Extension sets the flags parameter (3rd parameter in the call) to 0, which causes OpenSSL to return an error for unknown extension types:
eg. amending the call to use the value 1 << 16 or 65536 (X509V3_EXT_ERROR_UNKNOWN in OpenSSL) results in the call succeeding and printing <Not Supported> for the unknown extension type:
Issue
When calling the
crypto.X509Extension
method__str__()
, if the extension type is not supported by OpenSSL, anexception_type
error is raised:Environment:
Possible Cause
The current call to
X509V3_EXT_print()
incrypto.X509Extension
sets theflags
parameter (3rd parameter in the call) to0
, which causes OpenSSL to return an error for unknown extension types:Possible Fix
Update
X509V3_EXT_print()
to set theflags
parameter to one of the other valid values so that it returns success for unknown extension types.eg. amending the call to use the value
1 << 16
or65536
(X509V3_EXT_ERROR_UNKNOWN
in OpenSSL) results in the call succeeding and printing<Not Supported>
for the unknown extension type:The text was updated successfully, but these errors were encountered: