Skip to content

Commit

Permalink
remove unnecessary assumption about the size of dst
Browse files Browse the repository at this point in the history
With the new api the full length of dst is now passed in, if it is too small it should fail.
  • Loading branch information
pabuhler committed May 26, 2024
1 parent 327bdc2 commit 01b8704
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions crypto/cipher/aes_gcm_nss.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,12 +337,6 @@ static srtp_err_status_t srtp_aes_gcm_nss_encrypt(void *cv,
{
srtp_aes_gcm_ctx_t *c = (srtp_aes_gcm_ctx_t *)cv;

//#todo, this might need som looking at
// nss requires space for tag, currently we assume that ther is space, this
// should change, the best would be to merge the cipher encrypt and get_tag
// api
*dst_len += 16;

// When we get a non-NULL buffer, we know that the caller is
// prepared to also take the tag. When we get a NULL buffer,
// even though there's no data, we need to give NSS a buffer
Expand Down

0 comments on commit 01b8704

Please sign in to comment.