Skip to content

Commit

Permalink
Replace deprecated ssl.PROTOCOL_TLS in pki/client.py
Browse files Browse the repository at this point in the history
Resolves #4512
  • Loading branch information
ckelleyRH committed Jul 28, 2023
1 parent b093635 commit 5620925
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions base/common/python/pki/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ def __init__(self, pool_connections=DEFAULT_POOLSIZE,

def init_poolmanager(self, connections, maxsize,
block=adapters.DEFAULT_POOLBLOCK, **pool_kwargs):
context = ssl.SSLContext(
ssl.PROTOCOL_TLS # pylint: disable=no-member
)

tls_version = ssl.PROTOCOL_TLS_CLIENT if hasattr(ssl, "PROTOCOL_TLS_CLIENT") else ssl.PROTOCOL_TLS
context = ssl.SSLContext(tls_version)

# Enable post handshake authentication for TLS 1.3
if getattr(context, "post_handshake_auth", None) is not None:
Expand Down

0 comments on commit 5620925

Please sign in to comment.