Fix error when response has no cert but outstanding_certs is defined.

This commit is contained in:
Andreas Richter
2015-01-05 09:22:56 -05:00
parent 5174a48817
commit cd446e3d08

View File

@@ -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)