mirror of
https://github.com/Mbed-TLS/mbedtls-framework.git
synced 2026-06-05 21:15:09 +00:00
Make the output deterministic
Tests using randomized signatures were currently randomized. We need the output of the script to be reproducible, so this won't do. Force randomized signatures to use a specific RNG which is reset before constructing each test case. This way, the script's output is reproducible. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
@@ -45,6 +45,7 @@ class Key:
|
||||
self.public, self.secret = PURE[kl]._keygen_internal(seed)
|
||||
|
||||
def sign_message(self, message: bytes, deterministic: bool) -> bytes:
|
||||
PURE[self.kl].set_drbg_seed(bytes(48))
|
||||
return PURE[self.kl].sign(self.secret, message,
|
||||
deterministic=deterministic)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user