Commit 2a0e2bd2 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix hashing when using RFC4711

parent 17611282
...@@ -651,7 +651,16 @@ srtp_recv (srtp_session_t *s, uint8_t *buf, size_t *lenp) ...@@ -651,7 +651,16 @@ srtp_recv (srtp_session_t *s, uint8_t *buf, size_t *lenp)
rcc = roc; rcc = roc;
const uint8_t *tag = rtp_digest (s, buf, len, rcc); const uint8_t *tag = rtp_digest (s, buf, len, rcc);
if (memcmp (buf + len + roc_len, tag, s->tag_len)) #if 0
printf ("Computed: 0x");
for (unsigned i = 0; i < tag_len; i++)
printf ("%02x", tag[i]);
printf ("\nReceived: 0x");
for (unsigned i = 0; i < tag_len; i++)
printf ("%02x", buf[len + roc_len + i]);
puts ("");
#endif
if (memcmp (buf + len + roc_len, tag, tag_len))
return EACCES; return EACCES;
if (roc_len) if (roc_len)
......
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