mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 16:19:13 +02:00
_JWAHS.verify constant compare warning
This commit is contained in:
@@ -71,7 +71,12 @@ class _JWAHS(JWASignature):
|
|||||||
return HMAC.new(key, msg, self.digestmod).digest()
|
return HMAC.new(key, msg, self.digestmod).digest()
|
||||||
|
|
||||||
def verify(self, key, msg, sig):
|
def verify(self, key, msg, sig):
|
||||||
# TODO: use constant compare to mitigate timing attack?
|
"""Verify the signature.
|
||||||
|
|
||||||
|
.. warning::
|
||||||
|
Does not protect against timing attack (no constant compare).
|
||||||
|
|
||||||
|
"""
|
||||||
return self.sign(key, msg) == sig
|
return self.sign(key, msg) == sig
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user