Skip to content

Commit 7a4845a

Browse files
committed
Cleanse ECX private key stack buffers
1 parent 145255e commit 7a4845a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/wp_ecx_kmgmt.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,9 @@ static int wp_ecx_match_priv_key(const wp_Ecx* ecx1, const wp_Ecx* ecx2)
698698
ok = 0;
699699
}
700700

701+
OPENSSL_cleanse(key1, sizeof(key1));
702+
OPENSSL_cleanse(key2, sizeof(key2));
703+
701704
WOLFPROV_LEAVE(WP_LOG_COMP_KE, __FILE__ ":" WOLFPROV_STRINGIZE(__LINE__), ok);
702705
return ok;
703706
}

0 commit comments

Comments
 (0)