Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def http_or_disable(call, kwarg_name):
return (
tree.kwarg_str(call, kwarg_name, "HTTP")
or tree.kwarg_str(call, kwarg_name, "DISABLE")
)
def missing_or_string(s, call, kwarg_name):
return (
tree.kwarg_not_present(call, kwarg_name)
or tree.kwarg_str(call, kwarg_name, s)
)
def none_string_predicate(call, kwarg_name):
return tree.kwarg_str(call, kwarg_name, "none")
def unverified_cert_reqs(call, kwarg_name):
return tree.kwarg_any([
functools.partial(
tree.kwarg_str,
call,
kwarg_name,
"CERT_NONE"
),
functools.partial(
tree.kwarg_str,
call,
kwarg_name,
"NONE"
),
functools.partial(
tree.kwarg_module_path,
call,
kwarg_name,
"ssl.CERT_NONE",
self.namespace
def insecure_algorithm(call, kwarg_name):
return tree.kwarg_any([
functools.partial(
tree.kwarg_str,
call,
kwarg_name,
"http://www.w3.org/2000/09/xmldsig#sha1"
),
functools.partial(
tree.kwarg_str,
call,
kwarg_name,
"http://www.w3.org/2000/09/xmldsig#rsa-sha1"
),
functools.partial(
tree.kwarg_str,
call,
kwarg_name,
"http://www.w3.org/2000/09/xmldsig#dsa-sha1"
),
functools.partial(
tree.kwarg_module_path,
call,
kwarg_name,
"onelogin.saml2.constants.OneLogin_Saml2_Constants.SHA1",
self.namespace
),
functools.partial(
tree.kwarg_module_path,
call,
kwarg_name,
"onelogin.saml2.constants.OneLogin_Saml2_Constants.RSA_SHA1",
def unverified_cert_reqs(call, kwarg_name):
return tree.kwarg_any([
functools.partial(
tree.kwarg_str,
call,
kwarg_name,
"CERT_NONE"
),
functools.partial(
tree.kwarg_str,
call,
kwarg_name,
"NONE"
),
functools.partial(
tree.kwarg_module_path,
call,
kwarg_name,
"ssl.CERT_NONE",
self.namespace
),
def http_or_disable(call, kwarg_name):
return (
tree.kwarg_str(call, kwarg_name, "HTTP")
or tree.kwarg_str(call, kwarg_name, "DISABLE")
)
def insecure_algorithm(call, kwarg_name):
return tree.kwarg_any([
functools.partial(
tree.kwarg_str,
call,
kwarg_name,
"http://www.w3.org/2000/09/xmldsig#sha1"
),
functools.partial(
tree.kwarg_str,
call,
kwarg_name,
"http://www.w3.org/2000/09/xmldsig#rsa-sha1"
),
functools.partial(
tree.kwarg_str,
call,
kwarg_name,
"http://www.w3.org/2000/09/xmldsig#dsa-sha1"
),
functools.partial(
tree.kwarg_module_path,
call,
kwarg_name,
"onelogin.saml2.constants.OneLogin_Saml2_Constants.SHA1",
self.namespace