From: RĂ©mi Denis-Courmont Date: Thu, 17 May 2007 18:27:25 +0000 (+0000) Subject: Fix hashing when using RFC4711 X-Git-Tag: 0.9.0-test0~7391 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=2a0e2bd242f7dc7cda4ee096e58f42d13db9803f;hp=1761128257afdf85afd24a126bf469dcdd490985;p=vlc Fix hashing when using RFC4711 --- diff --git a/libs/srtp/srtp.c b/libs/srtp/srtp.c index ec303da83a..60c07b6f72 100644 --- a/libs/srtp/srtp.c +++ b/libs/srtp/srtp.c @@ -651,7 +651,16 @@ srtp_recv (srtp_session_t *s, uint8_t *buf, size_t *lenp) rcc = roc; 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; if (roc_len)