Commit 668dd4f8 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix SRTCP MAC

Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
(cherry picked from commit d7e4901bea30333f151de763ae72eaff9984e1e9)
parent 33aa2c49
......@@ -833,7 +833,7 @@ srtcp_send (srtp_session_t *s, uint8_t *buf, size_t *lenp, size_t bufsize)
len += 4; /* Digests SRTCP index too */
const uint8_t *tag = rtcp_digest (s->rtp.mac, buf, len);
const uint8_t *tag = rtcp_digest (s->rtcp.mac, buf, len);
memcpy (buf + len, tag, s->tag_len);
*lenp = len + s->tag_len;
return 0;
......@@ -861,7 +861,7 @@ srtcp_recv (srtp_session_t *s, uint8_t *buf, size_t *lenp)
return EINVAL;
len -= s->tag_len;
const uint8_t *tag = rtcp_digest (s->rtp.mac, buf, len);
const uint8_t *tag = rtcp_digest (s->rtcp.mac, buf, len);
if (memcmp (buf + len, tag, s->tag_len))
return EACCES;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment