diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2018-02-16 16:51:37 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-02-16 16:51:37 +0100 |
commit | cc1f4967415e35f4f68dcf90dc689f3b404f7eee (patch) | |
tree | 1329d55910b1e48a9579ff58ee22526a6ebd4865 /src/pki_container_openssh.c | |
parent | 963111b836af9a89c4156e92ab3ef5c03b346d87 (diff) | |
download | libssh-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/pki_container_openssh.c')
-rw-r--r-- | src/pki_container_openssh.c | 2 |
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; |