summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Richter <andy.richter@bridge-way.com>2015-01-05 09:22:56 -0500
committerAndreas Richter <andy.richter@bridge-way.com>2015-01-05 09:22:56 -0500
commitcd446e3d08f8adb0b3541442c3f7a32c16c8385f (patch)
tree01327dbec597c160aba8c9ce42d3611e7f9efdff
parent5174a488179d2b948a8a9faa705320b0da44abcd (diff)
downloadpysaml2-cd446e3d08f8adb0b3541442c3f7a32c16c8385f.tar.gz
Fix error when response has no cert but outstanding_certs is defined.
-rw-r--r--src/saml2/entity.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/saml2/entity.py b/src/saml2/entity.py
index f9d290ee..eed8233f 100644
--- a/src/saml2/entity.py
+++ b/src/saml2/entity.py
@@ -872,9 +872,13 @@ class Entity(HTTPBase):
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)