Browse Source

core-dump and srtcp auth tag length bugfixes

git.mgm/mediaproxy-ng/github/master
Richard Fuchs 13 years ago
parent
commit
a2b9d4048e
3 changed files with 7 additions and 2 deletions
  1. +4
    -0
      daemon/crypto.c
  2. +2
    -1
      daemon/crypto.h
  3. +1
    -1
      daemon/rtcp.c

+ 4
- 0
daemon/crypto.c View File

@ -74,6 +74,8 @@ const struct crypto_suite crypto_suites[] = {
.decrypt_rtcp = aes_cm_encrypt_rtcp,
.hash_rtp = hmac_sha1_rtp,
.hash_rtcp = hmac_sha1_rtcp,
.session_key_init = aes_session_key_init,
.session_key_cleanup = aes_session_key_cleanup,
},
{
.name = "F8_128_HMAC_SHA1_80",
@ -95,6 +97,8 @@ const struct crypto_suite crypto_suites[] = {
.decrypt_rtcp = aes_f8_encrypt_rtcp,
.hash_rtp = hmac_sha1_rtp,
.hash_rtcp = hmac_sha1_rtcp,
.session_key_init = aes_session_key_init,
.session_key_cleanup = aes_session_key_cleanup,
},
};


+ 2
- 1
daemon/crypto.h View File

@ -112,7 +112,8 @@ static inline int crypto_init_session_key(struct crypto_context *c) {
static inline void crypto_cleanup(struct crypto_context *c) {
if (!c->crypto_suite)
return;
c->crypto_suite->session_key_cleanup(c);
if (c->crypto_suite->session_key_cleanup)
c->crypto_suite->session_key_cleanup(c);
}


+ 1
- 1
daemon/rtcp.c View File

@ -392,7 +392,7 @@ int rtcp_avp2savp(str *s, struct crypto_context *c) {
rtp_append_mki(s, c);
c->crypto_suite->hash_rtcp(c, s->s + s->len, &to_auth);
s->len += c->crypto_suite->srtp_auth_tag;
s->len += c->crypto_suite->srtcp_auth_tag;
return 0;
}


Loading…
Cancel
Save