Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/genkey/clu_genkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -921,8 +921,12 @@ int wolfCLU_genKey_RSA(WC_RNG* rng, char* fName, int directive, int fmt, int

XFCLOSE(file);
file = NULL;
if (derBufSz > 0)
wolfCLU_ForceZero(derBuf, derBufSz);
XFREE(derBuf, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
derBuf = NULL;
if (pemBufSz > 0)
wolfCLU_ForceZero(pemBuf, pemBufSz);
XFREE(pemBuf, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
Comment on lines +924 to 930
pemBuf = NULL;

Expand Down Expand Up @@ -1014,9 +1018,13 @@ int wolfCLU_genKey_RSA(WC_RNG* rng, char* fName, int directive, int fmt, int
fOutNameBuf = NULL;
}
if (derBuf != NULL) {
if (derBufSz > 0)
wolfCLU_ForceZero(derBuf, derBufSz);
Comment on lines +1021 to +1022
XFREE(derBuf, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
}
if (pemBuf != NULL) {
if (pemBufSz > 0)
wolfCLU_ForceZero(pemBuf, pemBufSz);
Comment on lines +1026 to +1027
XFREE(pemBuf, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
}
if (file != NULL) {
Expand Down
Loading