From dddfe314c9322a35238aed0bb366c05d17304f00 Mon Sep 17 00:00:00 2001 From: Clint Byrum Date: Fri, 15 May 2015 11:50:11 -0700 Subject: [PATCH] Fix bytes/string python3 problems in cert We must be explicit now when string/byte is required. utf-8 is valid in x.509 and shouldn't be too restrictive. --- src/saml2/cert.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/saml2/cert.py b/src/saml2/cert.py index bc6d615..8249923 100644 --- a/src/saml2/cert.py +++ b/src/saml2/cert.py @@ -165,10 +165,10 @@ class OpenSSLWrapper(object): fk = open(k_f, "wt") if request: - fc.write(tmp_cert) + fc.write(tmp_cert.decode('utf-8')) else: - fc.write(tmp_cert) - fk.write(tmp_key) + fc.write(tmp_cert.decode('utf-8')) + fk.write(tmp_key.decode('utf-8')) filesCreated = True try: fc.close()