return NULL;
}
- if (tag_len > gcry_md_get_algo_dlen (auth))
+ if (tag_len > gcry_md_get_algo_dlen (md))
return NULL;
if (prf != SRTP_PRF_AES_CM)
|| gcry_cipher_setkey (prf, key, keylen))
return -1;
+#if 0
/* RTP key derivation */
if (s->kdr != 0)
{
}
}
else
+#endif
memset (r, 0, sizeof (r));
if (proto_derive (&s->rtp, prf, salt, saltlen, r, 6, false))
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)