aboutsummaryrefslogtreecommitdiff
path: root/modules/sasl
diff options
context:
space:
mode:
authorGravatar jesopo2019-02-12 23:52:09 +0000
committerGravatar jesopo2019-02-12 23:52:09 +0000
commit460d56eb74828cde6015e5e10e4dcf1cbc5ad781 (patch)
treefa45052de6719561e6ac0d34dc39853df2ed2101 /modules/sasl
parentSCRAM doesn't need constant_time_compare, nonces prevent replay (scram.py) (diff)
signature
Never allow use of MD2 (sasl.scram)
Diffstat (limited to 'modules/sasl')
-rw-r--r--modules/sasl/scram.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/sasl/scram.py b/modules/sasl/scram.py
index 565f97e7..80c6cbad 100644
--- a/modules/sasl/scram.py
+++ b/modules/sasl/scram.py
@@ -3,8 +3,9 @@ import base64, enum, hashlib, hmac, os, typing
# IANA Hash Function Textual Names
# https://tools.ietf.org/html/rfc5802#section-4
# https://www.iana.org/assignments/hash-function-text-names/
+# MD2 has been removed as it's unacceptably weak
ALGORITHMS = [
- "MD2", "MD5", "SHA-1", "SHA-224", "SHA-256", "SHA-384", "SHA-512"]
+ "MD5", "SHA-1", "SHA-224", "SHA-256", "SHA-384", "SHA-512"]
def _scram_nonce() -> bytes:
return base64.b64encode(os.urandom(32))