josepy icon indicating copy to clipboard operation
josepy copied to clipboard

`OpenSSL.crypto.X509Req` is deprecated in PyOpenSSL 24.2+

Open akx opened this issue 1 year ago • 0 comments

OpenSSL.crypto.X509Req is deprecated in pyOpenSSL 24.2+.

Thus, when importing josepy with that version of PyOpenSSL, the line

https://github.com/certbot/josepy/blob/87d798e884cd65ee8e6295688bbc765580092aee/src/josepy/util.py#L26

raises a deprecation warning:

CSR support in pyOpenSSL is deprecated. You should use the APIs in cryptography.

Repro

$ docker run -it python:3.12 bash
root@603470314b20:/# pip install josepy
Successfully installed cffi-1.17.0 cryptography-43.0.0 josepy-1.14.0 pycparser-2.22 pyopenssl-24.2.1
root@603470314b20:/# python -Xdev -c 'import josepy'
/usr/local/lib/python3.12/site-packages/josepy/util.py:26: DeprecationWarning: CSR support in pyOpenSSL is deprecated. You should use the APIs in cryptography.

akx avatar Aug 26 '24 11:08 akx