]> git-server-git.apps.pok.os.sepia.ceph.com Git - s3-tests.git/commitdiff
s3: replace deprecated ssl.wrap_socket() 734/head
authorCasey Bodley <cbodley@redhat.com>
Thu, 9 Apr 2026 15:49:20 +0000 (11:49 -0400)
committerCasey Bodley <cbodley@redhat.com>
Thu, 9 Apr 2026 20:30:44 +0000 (16:30 -0400)
this was deprecated in python 3.7 and removed in 3.12

Fixes: https://tracker.ceph.com/issues/75943
Signed-off-by: Casey Bodley <cbodley@redhat.com>
s3tests/functional/test_s3.py

index 5fee6a75fbf754040b78691c540c36dfbc70f85a..9168027162bfabac1ad45ee6bc8b80096a02f38a 100644 (file)
@@ -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)