fix decoding issue

This commit is contained in:
Yann Leboulanger 2015-07-18 18:10:55 +02:00
parent 44cd64b0f7
commit 66d88bc232
1 changed files with 2 additions and 1 deletions

View File

@ -194,7 +194,8 @@ def check_cert(jid, fingerprint):
cert = load_cert_file(certpath)
if cert:
try:
digest_algo = cert.get_signature_algorithm().split('With')[0]
digest_algo = cert.get_signature_algorithm().decode('utf-8').\
split('With')[0]
except AttributeError as e:
# Old py-OpenSSL is missing get_signature_algorithm
digest_algo = "sha256"