Skip to content

Commit

Permalink
tls: Securely clear memory from private key material.
Browse files Browse the repository at this point in the history
This ensures that sensitive data is not left on the stack.
  • Loading branch information
Lastique committed Jul 27, 2022
1 parent 970dcbb commit 9d370c4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/tls/openssl/tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -1195,6 +1195,8 @@ int tls_srtp_keyinfo(const struct tls_conn *tc, enum srtp_suite *suite,
memcpy(cli_key + key_size, p, salt_size); p += salt_size;
memcpy(srv_key + key_size, p, salt_size);

mem_secclean(keymat, sizeof(keymat));

return 0;
#else
(void)tc;
Expand Down

0 comments on commit 9d370c4

Please sign in to comment.