From 7440a3f421ac607e812161dd74d0653ca6ad5b22 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Fri, 18 Jan 2019 13:49:23 +0100 Subject: [PATCH] Sanitize key memory after use Signed-off-by: Simon Rozman --- src/Crypt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Crypt.cpp b/src/Crypt.cpp index a439dfb5..15685ea7 100644 --- a/src/Crypt.cpp +++ b/src/Crypt.cpp @@ -149,7 +149,7 @@ bool winstd::crypt_key::create_exp1(_In_ HCRYPTPROV hProv, _In_ DWORD dwKeySpec) handle_type h; if (CryptGenKey(hProv, dwKeySpec, CRYPT_EXPORTABLE, &h)) { // Export the private key, we'll convert it to a private exponent of one key. - std::vector key_blob; + std::vector> key_blob; if (CryptExportKey(h, 0, PRIVATEKEYBLOB, 0, key_blob)) { CryptDestroyKey(h);