Commit d7e4901b 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>
parent 61859210
...@@ -833,7 +833,7 @@ srtcp_send (srtp_session_t *s, uint8_t *buf, size_t *lenp, size_t bufsize) ...@@ -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 */ 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); memcpy (buf + len, tag, s->tag_len);
*lenp = len + s->tag_len; *lenp = len + s->tag_len;
return 0; return 0;
...@@ -861,7 +861,7 @@ srtcp_recv (srtp_session_t *s, uint8_t *buf, size_t *lenp) ...@@ -861,7 +861,7 @@ srtcp_recv (srtp_session_t *s, uint8_t *buf, size_t *lenp)
return EINVAL; return EINVAL;
len -= s->tag_len; 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)) if (memcmp (buf + len, tag, s->tag_len))
return EACCES; 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