From d85f35929382675d41d5f10af2f10ebe5f25f91b Mon Sep 17 00:00:00 2001 From: jesopo Date: Sun, 14 Jun 2020 18:37:11 +0100 Subject: [PATCH] SHA-1 scram name should be SHA1 (and fix typo in error rethrow) --- ircrobots/sasl.py | 2 +- ircrobots/scram.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ircrobots/sasl.py b/ircrobots/sasl.py index 026ac5c..887484c 100644 --- a/ircrobots/sasl.py +++ b/ircrobots/sasl.py @@ -161,7 +161,7 @@ class SASLContext(ServerContext): try: algo = SCRAMAlgorithm(algo_str_prep) except ValueError: - raise ValueError("Unknown SCRAM algorithm '%s'" % algo) + raise ValueError("Unknown SCRAM algorithm '%s'" % algo_str_prep) scram = SCRAMContext(algo, username, password) client_first = _b64eb(scram.client_first()) diff --git a/ircrobots/scram.py b/ircrobots/scram.py index 04788e6..7de3cf8 100644 --- a/ircrobots/scram.py +++ b/ircrobots/scram.py @@ -8,7 +8,7 @@ from typing import Dict # MD2 has been removed as it's unacceptably weak class SCRAMAlgorithm(Enum): MD5 = "MD5" - SHA_1 = "SHA-1" + SHA_1 = "SHA1" SHA_224 = "SHA224" SHA_256 = "SHA256" SHA_384 = "SHA384"