Skip to content

Commit

Permalink
Merge pull request #290 from pabuhler/check-cipher-id-for-aes-256-fix…
Browse files Browse the repository at this point in the history
…-1-6

Check for AES_256_ICM cipher type when processing RTCP
  • Loading branch information
pabuhler authored Apr 6, 2017
2 parents f8159a2 + 6736447 commit 6cae683
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions srtp/srtp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2756,7 +2756,8 @@ srtp_protect_rtcp(srtp_t ctx, void *rtcp_hdr, int *pkt_octet_len) {
/*
* if we're using rindael counter mode, set nonce and seq
*/
if (stream->rtcp_cipher->type->id == AES_ICM) {
if (stream->rtcp_cipher->type->id == AES_ICM ||
stream->rtcp_cipher->type->id == AES_256_ICM) {
v128_t iv;

iv.v32[0] = 0;
Expand Down Expand Up @@ -2977,7 +2978,8 @@ srtp_unprotect_rtcp(srtp_t ctx, void *srtcp_hdr, int *pkt_octet_len) {
/*
* if we're using aes counter mode, set nonce and seq
*/
if (stream->rtcp_cipher->type->id == AES_ICM) {
if (stream->rtcp_cipher->type->id == AES_ICM ||
stream->rtcp_cipher->type->id == AES_256_ICM) {
v128_t iv;

iv.v32[0] = 0;
Expand Down

0 comments on commit 6cae683

Please sign in to comment.