mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-07-28 01:41:48 +03:00
pki: Set ECDSA signature buffers secure
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Eshan Kelkar <eshankelkar@galorithm.com>
This commit is contained in:
@ -2276,6 +2276,9 @@ static int pki_signature_from_ecdsa_blob(UNUSED_PARAM(const ssh_key pubkey),
|
|||||||
return SSH_ERROR;
|
return SSH_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* The buffer will contain sensitive information. Make sure it is erased */
|
||||||
|
ssh_buffer_set_secure(buf);
|
||||||
|
|
||||||
rc = ssh_buffer_add_data(buf,
|
rc = ssh_buffer_add_data(buf,
|
||||||
ssh_string_data(sig_blob),
|
ssh_string_data(sig_blob),
|
||||||
(uint32_t)ssh_string_len(sig_blob));
|
(uint32_t)ssh_string_len(sig_blob));
|
||||||
|
@ -1848,6 +1848,8 @@ ssh_signature pki_signature_from_blob(const ssh_key pubkey,
|
|||||||
ssh_signature_free(sig);
|
ssh_signature_free(sig);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
/* The buffer will contain sensitive information. */
|
||||||
|
ssh_buffer_set_secure(b);
|
||||||
|
|
||||||
rc = ssh_buffer_add_data(b,
|
rc = ssh_buffer_add_data(b,
|
||||||
ssh_string_data(sig_blob),
|
ssh_string_data(sig_blob),
|
||||||
|
Reference in New Issue
Block a user