From 11cdc9aeb8107b167ee75f29b46713c56181039a Mon Sep 17 00:00:00 2001 From: Ivan Kanakarakis Date: Wed, 21 Nov 2018 18:26:14 +0200 Subject: Pull out sigalg and look it up once Signed-off-by: Ivan Kanakarakis --- src/saml2/entity.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/saml2/entity.py b/src/saml2/entity.py index 3320ed99..7b857373 100644 --- a/src/saml2/entity.py +++ b/src/saml2/entity.py @@ -225,8 +225,9 @@ class Entity(HTTPBase): info["method"] = "POST" elif binding == BINDING_HTTP_REDIRECT: logger.info("HTTP REDIRECT") - if sign and kwargs.get('sigalg', ''): - signer = self.sec.sec_backend.get_signer(kwargs['sigalg']) + sigalg = kwargs.get("sigalg") + if sign and sigalg: + signer = self.sec.sec_backend.get_signer(sigalg) else: signer = None info = self.use_http_get(msg_str, destination, relay_state, typ, -- cgit v1.2.1