diff --git a/src/saml2/client.py b/src/saml2/client.py index 5f82c6bc0..e8642dfa5 100644 --- a/src/saml2/client.py +++ b/src/saml2/client.py @@ -152,8 +152,8 @@ def prepare_for_negotiated_authenticate( # XXX ^through self.create_authn_request(...) # XXX - sign_redirect will add the signature to the query params # XXX ^through self.apply_binding(...) - sign_post = False if binding == BINDING_HTTP_REDIRECT else sign - sign_redirect = False if binding == BINDING_HTTP_POST and sign else sign + sign_redirect = sign and binding == BINDING_HTTP_REDIRECT + sign_post = sign and not sign_redirect reqid, request = self.create_authn_request( destination=destination, @@ -318,10 +318,8 @@ def do_logout( session_indexes = None sign = sign if sign is not None else self.logout_requests_signed - sign_post = sign and ( - binding == BINDING_HTTP_POST or binding == BINDING_SOAP - ) sign_redirect = sign and binding == BINDING_HTTP_REDIRECT + sign_post = sign and not sign_redirect log_report = { "message": "Invoking SLO on entity", diff --git a/src/saml2/httpbase.py b/src/saml2/httpbase.py index 5860992da..f83936396 100644 --- a/src/saml2/httpbase.py +++ b/src/saml2/httpbase.py @@ -315,7 +315,7 @@ def use_soap(self, request, destination="", soap_headers=None, sign=False, if sign and self.sec: _signed = self.sec.sign_statement(soap_message, - class_name=class_name(request), + node_name=class_name(request), node_id=request.id) soap_message = _signed diff --git a/src/saml2/pack.py b/src/saml2/pack.py index f08904716..36480743b 100644 --- a/src/saml2/pack.py +++ b/src/saml2/pack.py @@ -240,7 +240,7 @@ def make_soap_enveloped_saml_thingy(thingy, header_parts=None): if thingy[0:5].lower() == '