diff options
author | Hans Hörberg <hans.horberg@umu.se> | 2015-05-21 16:23:25 +0200 |
---|---|---|
committer | Hans Hörberg <hans.horberg@umu.se> | 2015-05-21 16:23:25 +0200 |
commit | e2b04612470264bda302d232a801db02dfed9ff6 (patch) | |
tree | 777c96691352136921fc0a2b1e8b1fb7043e5d67 /src/saml2/entity.py | |
parent | e70835bb25b59ffdfd1fd3dfe392de2df8e69941 (diff) | |
download | pysaml2-e2b04612470264bda302d232a801db02dfed9ff6.tar.gz |
Pysaml can now decrypt multiple encrypted assertions with multiple advice elements with multiple encrypted assertions.
Diffstat (limited to 'src/saml2/entity.py')
-rw-r--r-- | src/saml2/entity.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/saml2/entity.py b/src/saml2/entity.py index e7a75a5a..e7ef879c 100644 --- a/src/saml2/entity.py +++ b/src/saml2/entity.py @@ -978,7 +978,7 @@ class Entity(HTTPBase): # ------------------------------------------------------------------------ def _parse_response(self, xmlstr, response_cls, service, binding, - outstanding_certs=None, pefim=False, **kwargs): + outstanding_certs=None, **kwargs): """ Deal with a Response :param xmlstr: The response as a xml string @@ -1040,23 +1040,23 @@ class Entity(HTTPBase): logger.debug("XMLSTR: %s" % xmlstr) if response: + keys = None if outstanding_certs: try: cert = outstanding_certs[response.in_response_to] except KeyError: - key_file = "" + keys = None else: - _, key_file = make_temp("%s" % cert["key"], - decode=False) - else: - key_file = "" + if not isinstance(cert, list): + cert = [cert] + keys = [] + for _cert in cert: + keys.append(_cert["key"]) only_identity_in_encrypted_assertion = False if "only_identity_in_encrypted_assertion" in kwargs: only_identity_in_encrypted_assertion = kwargs["only_identity_in_encrypted_assertion"] - decrypt = True - if "decrypt" in kwargs: - decrypt = kwargs["decrypt"] - response = response.verify(key_file, decrypt=decrypt, pefim=pefim) + + response = response.verify(keys) if not response: return None |