From: Casey Bodley Date: Thu, 9 Apr 2026 15:49:20 +0000 (-0400) Subject: s3: replace deprecated ssl.wrap_socket() X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=54796a4965436bf85ffe635411d856f2f4935afe;p=s3-tests.git s3: replace deprecated ssl.wrap_socket() this was deprecated in python 3.7 and removed in 3.12 Fixes: https://tracker.ceph.com/issues/75943 Signed-off-by: Casey Bodley --- diff --git a/s3tests/functional/test_s3.py b/s3tests/functional/test_s3.py index 5fee6a75..91680271 100644 --- a/s3tests/functional/test_s3.py +++ b/s3tests/functional/test_s3.py @@ -6800,7 +6800,8 @@ def _simple_http_req_100_cont(host, port, is_secure, method, resource): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) if is_secure: - s = ssl.wrap_socket(s); + ctx = ssl.create_default_context() + s = ctx.wrap_socket(s, server_hostname=host); s.settimeout(5) s.connect((host, port)) s.send(req)