MCPcopy Index your code
hub / github.com/python/cpython / seclevel_workaround

Function seclevel_workaround

Lib/test/test_ssl.py:174–182  ·  view source on GitHub ↗

Lower security level to '1' and allow all ciphers for TLS 1.0/1

(*ctxs)

Source from the content-addressed store, hash-verified

172
173if is_ubuntu():
174 def seclevel_workaround(*ctxs):
175 """Lower security level to '1' and allow all ciphers for TLS 1.0/1"""
176 for ctx in ctxs:
177 if (
178 hasattr(ctx, "minimum_version") and
179 ctx.minimum_version <= ssl.TLSVersion.TLSv1_1 and
180 ctx.security_level > 1
181 ):
182 ctx.set_ciphers("@SECLEVEL=1:ALL")
183else:
184 def seclevel_workaround(*ctxs):
185 pass

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…