aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2018-02-16 16:51:37 +0100
committerAndreas Schneider <asn@cryptomilk.org>2018-02-16 16:51:37 +0100
commitcc1f4967415e35f4f68dcf90dc689f3b404f7eee (patch)
tree1329d55910b1e48a9579ff58ee22526a6ebd4865 /src
parent963111b836af9a89c4156e92ab3ef5c03b346d87 (diff)
downloadlibssh-cc1f4967415e35f4f68dcf90dc689f3b404f7eee.tar.gz
libssh-cc1f4967415e35f4f68dcf90dc689f3b404f7eee.tar.xz
libssh-cc1f4967415e35f4f68dcf90dc689f3b404f7eee.zip
pki: Use explicit_bzero() to wipe privkey in memory
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src')
-rw-r--r--src/pki_container_openssh.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pki_container_openssh.c b/src/pki_container_openssh.c
index 47447421..5723d823 100644
--- a/src/pki_container_openssh.c
+++ b/src/pki_container_openssh.c
@@ -109,7 +109,7 @@ static int pki_openssh_import_privkey_blob(ssh_buffer key_blob_buffer,
}
memcpy(key->ed25519_privkey, ssh_string_data(privkey), ED25519_SK_LEN);
memcpy(key->ed25519_pubkey, ssh_string_data(pubkey), ED25519_PK_LEN);
- memset(ssh_string_data(privkey), 0, ED25519_SK_LEN);
+ explicit_bzero(ssh_string_data(privkey), ED25519_SK_LEN);
SAFE_FREE(privkey);
SAFE_FREE(pubkey);
break;