summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2017-04-03 11:02:00 -0400
committerOlivier CrĂȘte <olivier.crete@collabora.com>2017-04-03 11:27:14 -0400
commitc54a329b8166baf052935ef34fe19b7162bd2e80 (patch)
tree84134b29c08c0a579653441ed354fee52197d160
parent6e45d1866ea92a019b9cd18642cb43123980b0ca (diff)
downloadlibnice-c54a329b8166baf052935ef34fe19b7162bd2e80.tar.gz
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
-rw-r--r--stun/rand.c2
-rw-r--r--stun/rand.h2
-rw-r--r--stun/stunhmac.c2
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 <gnutls/gnutls.h>
#include <gnutls/crypto.h>
-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 <stdint.h>
#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);
}