diff options
Diffstat (limited to 'src/ext/ed25519/ref10/keypair.c')
-rw-r--r-- | src/ext/ed25519/ref10/keypair.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ext/ed25519/ref10/keypair.c b/src/ext/ed25519/ref10/keypair.c index e861998071..7ddbaa971e 100644 --- a/src/ext/ed25519/ref10/keypair.c +++ b/src/ext/ed25519/ref10/keypair.c @@ -1,4 +1,4 @@ -/* Modified for Tor: new API, 32-byte secret keys. */ +/* Modified for Tor: new API, 64-byte secret keys. */ #include <string.h> #include "randombytes.h" #include "crypto_sign.h" @@ -10,7 +10,8 @@ crypto_sign_seckey(unsigned char *sk) { unsigned char seed[32]; - randombytes(seed,32); + if (randombytes(seed,32) < 0) + return -1; crypto_sign_seckey_expand(sk, seed); |