Skip to content

Commit

Permalink
Merge pull request #188 from richtera/master
Browse files Browse the repository at this point in the history
Fix error when response has no cert but outstanding_certs is defined.
  • Loading branch information
Roland Hedberg committed Mar 11, 2015
2 parents a1b7a97 + cd446e3 commit 055b314
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/saml2/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -937,9 +937,13 @@ def _parse_response(self, xmlstr, response_cls, service, binding,

if response:
if outstanding_certs:
_, key_file = make_temp(
"%s" % outstanding_certs[
response.in_response_to]["key"], decode=False)
cert = outstanding_certs[
response.in_response_to]
if cert:
_, key_file = make_temp(
"%s" % cert["key"], decode=False)
else:
key_file = ""
else:
key_file = ""
response = response.verify(key_file)
Expand Down

0 comments on commit 055b314

Please sign in to comment.