#9129 Remove Python warning about PROTOCOL_SSLv23
Closed: fixed by frenaud. Opened by abbra.

Python 3.10 deprecated ssl.PROTOCOL_TLS and ssl.PROTOCOL_SSLv23 constants which were aliases to each other. Use of them now causes a warning to be displayed:

    /usr/lib/python3.10/site-packages/ipalib/util.py:347: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated
      ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)

Use ssl.PROTOCOL_TLS_CLIENT instead, this constant is available since Python 3.6.


Already reported in https://pagure.io/freeipa/issue/9113

https://github.com/freeipa/freeipa/pull/6217

master:

  • d237c40b2c1eb233cd9566bd1cfd3232d11e948e ipalib/util.py: switch to ssl.PROTOCOL_TLS_CLIENT by default

ipa-4-9:

  • 3e8a355dd49a6c080103a030ced03597ee4baece ipalib/util.py: switch to ssl.PROTOCOL_TLS_CLIENT by default

Metadata Update from @frenaud:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

Metadata