Skip to content

Commit d05e503

Browse files
committed
Fix for possible leak of ephemeral key in TLS server example.
1 parent 937dbd0 commit d05e503

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

examples/tls/tls_server.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,9 @@ int TPM2_TLS_ServerArgs(void* userCtx, int argc, char *argv[])
513513
#ifdef HAVE_ECC
514514
wc_ecc_free(&wolfEccKey);
515515
wolfTPM2_UnloadHandle(&dev, &eccKey.handle);
516+
#ifndef WOLFTPM2_USE_SW_ECDHE
517+
wolfTPM2_UnloadHandle(&dev, &ecdhKey.handle);
518+
#endif
516519
#endif
517520
wolfTPM2_UnloadHandle(&dev, &tpmSession.handle);
518521

0 commit comments

Comments
 (0)