diff --git a/daemon/crypto.c b/daemon/crypto.c index 3f1dd916d..67df69801 100644 --- a/daemon/crypto.c +++ b/daemon/crypto.c @@ -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, }, }; diff --git a/daemon/crypto.h b/daemon/crypto.h index 7cae45ed6..e284acfd1 100644 --- a/daemon/crypto.h +++ b/daemon/crypto.h @@ -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); } diff --git a/daemon/rtcp.c b/daemon/rtcp.c index c2eb6b296..921ee1f13 100644 --- a/daemon/rtcp.c +++ b/daemon/rtcp.c @@ -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; }