From c54a329b8166baf052935ef34fe19b7162bd2e80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Mon, 3 Apr 2017 11:02:00 -0400 Subject: stun: Rename rand function to make its strengh clear It's only nonce level randomness, not long term key level. Differential Revision: https://phabricator.freedesktop.org/D1711 --- stun/rand.c | 2 +- stun/rand.h | 2 +- stun/stunhmac.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/stun/rand.c b/stun/rand.c index 1deaf56..3ac6741 100644 --- a/stun/rand.c +++ b/stun/rand.c @@ -72,7 +72,7 @@ void nice_RAND_bytes (uint8_t *dst, int len) #include #include -void nice_RAND_bytes (uint8_t *dst, int len) +void nice_RAND_nonce (uint8_t *dst, int len) { gnutls_rnd (GNUTLS_RND_NONCE, dst, len); } diff --git a/stun/rand.h b/stun/rand.h index 0ed0263..4266a4f 100644 --- a/stun/rand.h +++ b/stun/rand.h @@ -45,6 +45,6 @@ #include #endif -void nice_RAND_bytes (uint8_t *dst, int len); +void nice_RAND_nonce (uint8_t *dst, int len); #endif /* RAND_H */ diff --git a/stun/stunhmac.c b/stun/stunhmac.c index 825656a..d488e04 100644 --- a/stun/stunhmac.c +++ b/stun/stunhmac.c @@ -124,5 +124,5 @@ void stun_hash_creds (const uint8_t *realm, size_t realm_len, void stun_make_transid (StunTransactionId id) { - nice_RAND_bytes (id, 16); + nice_RAND_nonce (id, 16); } -- cgit v1.2.1