Skip to content

OpenSSL.crypto.X509Req is deprecated in PyOpenSSL 24.2+ #181

@akx

Description

@akx

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

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

def __init__(self, wrapped: Union[crypto.X509, crypto.X509Req]) -> None:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions