MCPcopy Index your code
hub / github.com/RustPython/RustPython / seclevel_workaround

Function seclevel_workaround

Lib/test/test_ssl.py:154–162  ·  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

152
153if is_ubuntu():
154 def seclevel_workaround(*ctxs):
155 """Lower security level to '1' and allow all ciphers for TLS 1.0/1"""
156 for ctx in ctxs:
157 if (
158 hasattr(ctx, "minimum_version") and
159 ctx.minimum_version <= ssl.TLSVersion.TLSv1_1 and
160 ctx.security_level > 1
161 ):
162 ctx.set_ciphers("@SECLEVEL=1:ALL")
163else:
164 def seclevel_workaround(*ctxs):
165 pass

Calls 2

hasattrFunction · 0.85
set_ciphersMethod · 0.45

Tested by

no test coverage detected