diff options
author | Pascal Bühler <pabuhler@cisco.com> | 2019-07-10 13:24:50 +0200 |
---|---|---|
committer | Pascal Bühler <pabuhler@cisco.com> | 2019-07-10 13:24:50 +0200 |
commit | 3e29307f7acc651f2b6a68f0932dfc706b90f628 (patch) | |
tree | 75557baf33d9c365dae56d8d2e4b67c5b74d6a37 | |
parent | 4ade1cbf54e4a63537690c2d41525a218f0f684f (diff) | |
download | libsrtp2-3e29307f7acc651f2b6a68f0932dfc706b90f628.tar.gz |
remove support for rand_s in tests
Since rand_s is only supported on windows
and this functions is only for tests.
-rw-r--r-- | crypto/cipher/cipher.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/crypto/cipher/cipher.c b/crypto/cipher/cipher.c index 88a4a71..354517d 100644 --- a/crypto/cipher/cipher.c +++ b/crypto/cipher/cipher.c @@ -171,19 +171,6 @@ int srtp_cipher_get_key_length(const srtp_cipher_t *c) */ void srtp_cipher_rand_for_tests(void *dest, uint32_t len) { -#if defined(HAVE_RAND_S) - uint8_t *dst = (uint8_t *)dest; - while (len) { - unsigned int val; - errno_t err = rand_s(&val); - - if (err != 0) - return srtp_err_status_fail; - - *dst++ = val & 0xff; - len--; - } -#else /* Generic C-library (rand()) version */ /* This is a random source of last resort */ uint8_t *dst = (uint8_t *)dest; @@ -195,7 +182,6 @@ void srtp_cipher_rand_for_tests(void *dest, uint32_t len) *dst++ = val & 0xff; len--; } -#endif } /* |