Skip to content

Commit dddfe31

Browse files
committed
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.
1 parent 1123b7d commit dddfe31

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/saml2/cert.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,10 @@ def create_certificate(self, cert_info, request=False, valid_from=0,
165165
fk = open(k_f, "wt")
166166

167167
if request:
168-
fc.write(tmp_cert)
168+
fc.write(tmp_cert.decode('utf-8'))
169169
else:
170-
fc.write(tmp_cert)
171-
fk.write(tmp_key)
170+
fc.write(tmp_cert.decode('utf-8'))
171+
fk.write(tmp_key.decode('utf-8'))
172172
filesCreated = True
173173
try:
174174
fc.close()

0 commit comments

Comments
 (0)