diff options
Diffstat (limited to 'src/saml2/entity.py')
-rw-r--r-- | src/saml2/entity.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/saml2/entity.py b/src/saml2/entity.py index 0e2cc94c..f76ae67d 100644 --- a/src/saml2/entity.py +++ b/src/saml2/entity.py @@ -144,8 +144,8 @@ class Entity(HTTPBase): if _val.startswith("http"): r = requests.request("GET", _val) if r.status_code == 200: - _, filename = make_temp(r.text, ".pem", False) - setattr(self.config, item, filename) + tmp = make_temp(r.text, ".pem", False) + setattr(self.config, item, tmp.name) else: raise Exception( "Could not fetch certificate from %s" % _val) @@ -560,8 +560,8 @@ class Entity(HTTPBase): _cert = "%s%s" % (begin_cert, _cert) if end_cert not in _cert: _cert = "%s%s" % (_cert, end_cert) - _, cert_file = make_temp(_cert.encode('ascii'), decode=False) - response = self.sec.encrypt_assertion(response, cert_file, + tmp = make_temp(_cert.encode('ascii'), decode=False) + response = self.sec.encrypt_assertion(response, tmp.name, pre_encryption_part(), node_xpath=node_xpath) return response |