Skip to content
Snippets Groups Projects
Commit 91b6a76d authored by Alexandre Savard's avatar Alexandre Savard
Browse files

[#1722] Use memcopy instead to copy PRN in keys

parent 050b0b1c
No related branches found
No related tags found
No related merge requests found
......@@ -111,7 +111,11 @@ void AudioSrtpSession::initializeLocalMasterKey(void)
if((err = RAND_bytes(random_key, _localMasterKeyLength)) != 1)
_debug("Error occured while generating cryptographically strong pseudo-random key");
memcpy(_localMasterKey, mk, _localMasterKeyLength);
// memcpy(_localMasterKey, mk, _localMasterKeyLength);
for(int i = 0; i < _localMasterKeyLength; i++){
_localMasterKey[i] = mk[i];
}
return;
}
......@@ -129,7 +133,11 @@ void AudioSrtpSession::initializeLocalMasterSalt(void)
if((err = RAND_bytes(random_key, _localMasterSaltLength)) != 1)
_debug("Error occured while generating cryptographically strong pseudo-random key");
memcpy(_localMasterSalt, ms, _localMasterSaltLength);
// memcpy(_localMasterSalt, ms, _localMasterSaltLength);
for(int i = 0; i < _localMasterSaltLength; i++){
_localMasterSalt[i] = ms[i];
}
return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment