mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-23 06:08:07 +00:00
Fix SRTP crypto key generation.
This commit is contained in:
parent
8a23ea59b7
commit
5781fcbde2
1 changed files with 1 additions and 1 deletions
|
|
@ -1158,7 +1158,7 @@ void MediaSessionPrivate::forceStreamsDirAccordingToState (SalMediaDescription *
|
|||
|
||||
bool MediaSessionPrivate::generateB64CryptoKey (size_t keyLength, char *keyOut, size_t keyOutSize) {
|
||||
uint8_t *tmp = (uint8_t *)ms_malloc0(keyLength);
|
||||
if (sal_get_random_bytes(tmp, keyLength)) {
|
||||
if (!sal_get_random_bytes(tmp, keyLength)) {
|
||||
lError() << "Failed to generate random key";
|
||||
ms_free(tmp);
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue