summaryrefslogtreecommitdiff
path: root/src/common/crypto_curve25519.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-11-25 10:42:00 -0500
committerNick Mathewson <nickm@torproject.org>2015-11-25 22:29:59 -0500
commitddcbe264745a0c10d80d8ad74125d23eb251662d (patch)
treeb522f4302d71982a38ad0caf34b77b6c675103c2 /src/common/crypto_curve25519.c
parent10fdee628552bca65ddb86b17e0b057628ad3703 (diff)
downloadtor-ddcbe264745a0c10d80d8ad74125d23eb251662d.tar.gz
tor-ddcbe264745a0c10d80d8ad74125d23eb251662d.zip
Now that crypto_rand() cannot fail, it should return void.
Diffstat (limited to 'src/common/crypto_curve25519.c')
-rw-r--r--src/common/crypto_curve25519.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/common/crypto_curve25519.c b/src/common/crypto_curve25519.c
index ac0b08a552..00302a2ff0 100644
--- a/src/common/crypto_curve25519.c
+++ b/src/common/crypto_curve25519.c
@@ -113,8 +113,7 @@ curve25519_rand_seckey_bytes(uint8_t *out, int extra_strong)
{
uint8_t k_tmp[CURVE25519_SECKEY_LEN];
- if (crypto_rand((char*)out, CURVE25519_SECKEY_LEN) < 0)
- return -1;
+ crypto_rand((char*)out, CURVE25519_SECKEY_LEN);
if (extra_strong && !crypto_strongest_rand(k_tmp, CURVE25519_SECKEY_LEN)) {
/* If they asked for extra-strong entropy and we have some, use it as an
* HMAC key to improve not-so-good entropy rather than using it directly,