SHA-1 scram name should be SHA1 (and fix typo in error rethrow)

This commit is contained in:
jesopo 2020-06-14 18:37:11 +01:00
parent 67e6064b67
commit d85f359293
2 changed files with 2 additions and 2 deletions

View File

@ -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())

View File

@ -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"