diff -up ./src/ortp_srtp.c.rand ./src/ortp_srtp.c
--- ./src/ortp_srtp.c.rand 2019-12-11 10:54:32.761146535 -0500
+++ ./src/ortp_srtp.c 2019-12-11 10:57:50.095212431 -0500
@@ -272,7 +272,12 @@ static bool_t ortp_init_srtp_policy(srtp
err_status_t ortp_crypto_get_random(uint8_t *tmp, int size)
{
- return crypto_get_random(tmp, size);
+ static int fd=-1;
+ if (fd==-1) fd=open("/dev/urandom",O_RDONLY);
+ if (fd!=-1) {
+ if (read(fd,tmp,size)==size) return err_status_ok;
+ }
+ return -1;
}
srtp_t ortp_srtp_create_configure_session(enum ortp_srtp_crypto_suite_t suite, uint32_t ssrc, const char* snd_key, const char* rcv_key)