irclib.py: fix an encoding error with Python 3 and SASL ECDSA-NIST256P-CHALLENGE

Closes ProgVal#1028.
This commit is contained in:
James Lu 2015-01-24 13:32:13 -05:00
parent b2f245d8a8
commit 561085cbd1

View File

@ -1009,7 +1009,7 @@ class Irc(IrcCommandDispatcher):
private_key = SigningKey.from_pem(open(self.sasl_ecdsa_key).
read())
authstring = base64.b64encode(
private_key.sign(base64.b64decode(msg.args[0]))).decode('utf-8')
private_key.sign(base64.b64decode(msg.args[0].encode()))).decode('utf-8')
except (BadDigestError, OSError, ValueError) as e:
authstring = "*"