Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
cb6f01e9
Commit
cb6f01e9
authored
13 years ago
by
Tristan Matthews
Browse files
Options
Downloads
Patches
Plain Diff
* #9832: AudioSRTPSession: fix logging
parent
cf6c05e3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
daemon/src/audio/audiortp/audio_srtp_session.cpp
+10
-10
10 additions, 10 deletions
daemon/src/audio/audiortp/audio_srtp_session.cpp
with
10 additions
and
10 deletions
daemon/src/audio/audiortp/audio_srtp_session.cpp
+
10
−
10
View file @
cb6f01e9
...
...
@@ -97,7 +97,7 @@ namespace {
// Fills the array dest with length random bytes
void
buffer_fill
(
unsigned
char
dest
[],
size_t
length
)
{
DEBUG
(
"
AudioSrtp:
Init local master key"
);
DEBUG
(
"Init local master key"
);
// @TODO key may have different length depending on cipher suite
// Allocate memory for key
...
...
@@ -133,7 +133,7 @@ AudioSrtpSession::AudioSrtpSession(SIPCall &call) :
ost
::
CryptoContext
*
AudioSrtpSession
::
initLocalCryptoInfo
()
{
DEBUG
(
"
AudioSrtp:
Set cryptographic info for this rtp session"
);
DEBUG
(
"Set cryptographic info for this rtp session"
);
// Initialize local Crypto context
initializeLocalMasterKey
();
...
...
@@ -150,7 +150,7 @@ ost::CryptoContext* AudioSrtpSession::initLocalCryptoInfo()
std
::
vector
<
std
::
string
>
AudioSrtpSession
::
getLocalCryptoInfo
()
{
DEBUG
(
"
AudioSrtp:
Get Cryptographic info from this rtp session"
);
DEBUG
(
"Get Cryptographic info from this rtp session"
);
std
::
vector
<
std
::
string
>
crypto_vector
;
...
...
@@ -206,11 +206,11 @@ AudioSrtpSession::setRemoteCryptoInfo(sfl::SdesNegotiator& nego)
void
AudioSrtpSession
::
initializeLocalMasterKey
()
{
DEBUG
(
"
AudioSrtp:
Init local master key"
);
DEBUG
(
"Init local master key"
);
// @TODO key may have different length depending on cipher suite
localMasterKeyLength_
=
sfl
::
CryptoSuites
[
localCryptoSuite_
].
masterKeyLength
/
8
;
assert
(
ARRAYSIZE
(
localMasterKey_
)
>=
localMasterKeyLength_
);
DEBUG
(
"
AudioSrtp:
Local master key length %d"
,
localMasterKeyLength_
);
DEBUG
(
"Local master key length %d"
,
localMasterKeyLength_
);
buffer_fill
(
localMasterKey_
,
localMasterKeyLength_
);
}
...
...
@@ -219,20 +219,20 @@ void AudioSrtpSession::initializeLocalMasterSalt()
// @TODO key may have different length depending on cipher suite
localMasterSaltLength_
=
sfl
::
CryptoSuites
[
localCryptoSuite_
].
masterSaltLength
/
8
;
assert
(
ARRAYSIZE
(
localMasterSalt_
)
>=
localMasterSaltLength_
);
DEBUG
(
"
AudioSrtp:
Local master salt length %d"
,
localMasterSaltLength_
);
DEBUG
(
"Local master salt length %d"
,
localMasterSaltLength_
);
buffer_fill
(
localMasterSalt_
,
localMasterSaltLength_
);
}
std
::
string
AudioSrtpSession
::
getBase64ConcatenatedKeys
()
{
DEBUG
(
"
AudioSrtp:
Get base64 concatenated keys"
);
DEBUG
(
"Get base64 concatenated keys"
);
// compute concatenated master and salt length
int
concatLength
=
localMasterKeyLength_
+
localMasterSaltLength_
;
uint8
concatKeys
[
concatLength
];
DEBUG
(
"
AudioSrtp:
Concatenated length %d"
,
concatLength
);
DEBUG
(
"Concatenated length %d"
,
concatLength
);
// concatenate keys
memcpy
((
void
*
)
concatKeys
,
(
void
*
)
localMasterKey_
,
localMasterKeyLength_
);
...
...
@@ -260,7 +260,7 @@ void AudioSrtpSession::unBase64ConcatenatedKeys(std::string base64keys)
void
AudioSrtpSession
::
initializeRemoteCryptoContext
()
{
DEBUG
(
"
AudioSrtp:
Initialize remote crypto context"
);
DEBUG
(
"Initialize remote crypto context"
);
const
CryptoSuiteDefinition
&
crypto
=
sfl
::
CryptoSuites
[
remoteCryptoSuite_
];
...
...
@@ -284,7 +284,7 @@ void AudioSrtpSession::initializeRemoteCryptoContext()
void
AudioSrtpSession
::
initializeLocalCryptoContext
()
{
DEBUG
(
"
AudioSrtp:
Initialize local crypto context"
);
DEBUG
(
"Initialize local crypto context"
);
const
CryptoSuiteDefinition
&
crypto
=
sfl
::
CryptoSuites
[
localCryptoSuite_
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment