Skip to content

Commit

Permalink
Ensure chan_sip rejects encrypted streams without crypto info
Browse files Browse the repository at this point in the history
This ensures that Asterisk rejects encrypted media streams (RTP/SAVP
audio and video) that are missing cryptographic keys and ensures that
the incoming SDP is consistent with RFC4568 as far as having a crypto
attribute present for any SAVP streams.

Review: https://reviewboard.asterisk.org/r/2204/
........

Merged revisions 378217 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 378218 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 378219 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378220 65c4cc65-6c06-0410-ace0-fbb531ad65f3
  • Loading branch information
Kinsey Moore committed Dec 31, 2012
1 parent 255d82a commit 32472ec
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions channels/chan_sip.c
Expand Up @@ -10437,6 +10437,15 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req, int t38action
type, value,
(processed == TRUE)? "OK." : "UNSUPPORTED OR FAILED.");
}

/* Ensure crypto lines are provided where necessary */
if (audio && secure_audio && !processed_crypto) {
ast_log(LOG_WARNING, "Rejecting secure audio stream without encryption details: %s\n", m);
return -1;
} else if (video && secure_video && !processed_crypto) {
ast_log(LOG_WARNING, "Rejecting secure video stream without encryption details: %s\n", m);
return -1;
}
}

/* Sanity checks */
Expand Down

0 comments on commit 32472ec

Please sign in to comment.