TT#108551 fix AEAD kernel encryption of small packets

closes #1230

Change-Id: I26cae7b53eed1ff8155d2fa1e1aa5283a9c37d36
(cherry picked from commit e70d203802)
pull/1285/head
Richard Fuchs 5 years ago
parent 2fc6631423
commit 82a4b789f2

@ -593,6 +593,9 @@ static int aes_gcm_decrypt_rtp(struct crypto_context *c, struct rtp_header *r, s
unsigned char iv[12];
int len, plaintext_len;
if (s->len < 16)
return -1;
memcpy(iv, c->session_salt, 12);
*(u_int32_t*)(iv+2) ^= r->ssrc;

@ -3914,8 +3914,6 @@ static int srtp_encrypt_aes_gcm(struct re_crypto_context *c,
if (s->session_salt_len != 12)
return -EINVAL;
if (r->payload_len < 16)
return -EINVAL;
memcpy(iv, c->session_salt, 12);

Loading…
Cancel
Save