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

[#1722] Use getLocalSSRC instead in IncommingDataQueue and OutgoingDataQueue

parent d252ab34
Branches
Tags
No related merge requests found
...@@ -38,7 +38,7 @@ AudioSrtpSession::AudioSrtpSession (ManagerImpl * manager, SIPCall * sipcall) : ...@@ -38,7 +38,7 @@ AudioSrtpSession::AudioSrtpSession (ManagerImpl * manager, SIPCall * sipcall) :
ost::SymmetricRTPSession (ost::InetHostAddress (sipcall->getLocalIp().c_str()), sipcall->getLocalAudioPort()), ost::SymmetricRTPSession (ost::InetHostAddress (sipcall->getLocalIp().c_str()), sipcall->getLocalAudioPort()),
AudioRtpSession<AudioSrtpSession> (manager, sipcall) AudioRtpSession<AudioSrtpSession> (manager, sipcall)
{ {
_debug ("AudioSrtpSession initialized"); _debug ("***************** AudioSrtpSession initialized *********************");
initializeMasterKey(); initializeMasterKey();
initializeMasterSalt(); initializeMasterSalt();
initializeInputCryptoContext(); initializeInputCryptoContext();
...@@ -72,7 +72,7 @@ void AudioSrtpSession::initializeMasterSalt(void) ...@@ -72,7 +72,7 @@ void AudioSrtpSession::initializeMasterSalt(void)
void AudioSrtpSession::initializeInputCryptoContext(void) void AudioSrtpSession::initializeInputCryptoContext(void)
{ {
inputCryptoCtx = new ost::CryptoContext(getLocalSSRCNetwork(), inputCryptoCtx = new ost::CryptoContext(IncomingDataQueue::getLocalSSRC(),
0, // roc, 0, // roc,
0L, // keydr, 0L, // keydr,
SrtpEncryptionAESCM, // encryption algo SrtpEncryptionAESCM, // encryption algo
...@@ -85,12 +85,14 @@ void AudioSrtpSession::initializeInputCryptoContext(void) ...@@ -85,12 +85,14 @@ void AudioSrtpSession::initializeInputCryptoContext(void)
160 / 8, // authentication key len 160 / 8, // authentication key len
112 / 8, // session salt len 112 / 8, // session salt len
80 / 8); // authentication tag len 80 / 8); // authentication tag len
_debug("********************* Crypto Context IN with SSRC %i ******************", IncomingDataQueue::getLocalSSRC());
} }
void AudioSrtpSession::initializeOutputCryptoContext(void) void AudioSrtpSession::initializeOutputCryptoContext(void)
{ {
outputCryptoCtx = new ost::CryptoContext(getLocalSSRCNetwork(), outputCryptoCtx = new ost::CryptoContext(OutgoingDataQueue::getLocalSSRC(),
0, // roc, 0, // roc,
0L, // keydr, 0L, // keydr,
SrtpEncryptionAESCM, // encryption algo SrtpEncryptionAESCM, // encryption algo
...@@ -103,5 +105,7 @@ void AudioSrtpSession::initializeOutputCryptoContext(void) ...@@ -103,5 +105,7 @@ void AudioSrtpSession::initializeOutputCryptoContext(void)
160 / 8, // authentication key len 160 / 8, // authentication key len
112 / 8, // session salt len 112 / 8, // session salt len
80 / 8); // authentication tag len 80 / 8); // authentication tag len
_debug("********************* Crypto Context OUT with SSRC %i ******************", OutgoingDataQueue::getLocalSSRC());
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment