]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
Fix CI deprecation warning
authorDimitri Papadopoulos Orfanos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
Sat, 19 Oct 2024 15:47:25 +0000 (17:47 +0200)
committerDimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
Tue, 7 Jan 2025 17:44:23 +0000 (18:44 +0100)
fake-cisco-server.py:205: DeprecationWarning: ssl.SSLContext() without protocol argument is deprecated.
fake-cisco-server.py:205: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated

All ssl.PROTOCOL_TLS* constants have been added in Python 3.6, and
the default PROTOCOL_TLS has been deprecated since Python 3.10.

Signed-off-by: Dimitri Papadopoulos Orfanos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
tests/fake-cisco-server.py

index 5cf2446fc1b0f96a71efd2079f962a9db237cb3e..b2d8f4ed1ece81b268d45f1d918bd02af5440d37 100755 (executable)
@@ -202,7 +202,7 @@ def auth_reply(dict_req):
 
 
 def main(args):
-    context = ssl.SSLContext()
+    context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
 
     # Verify that TLS requests include the appropriate client certificate
     context.load_cert_chain(args.cert, args.key)