mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-08-08 19:02:06 +03:00
pki: Fix session_id hashing.
I don't understand why this code worked before. It was completly wrong.
This commit is contained in:
@@ -1088,11 +1088,11 @@ ssh_string ssh_pki_do_sign(ssh_session session,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
session_id = ssh_string_new(SHA_DIGEST_LEN);
|
session_id = ssh_string_new(crypto->digest_len);
|
||||||
if (session_id == NULL) {
|
if (session_id == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
ssh_string_fill(session_id, crypto->session_id, SHA_DIGEST_LEN);
|
ssh_string_fill(session_id, crypto->session_id, crypto->digest_len);
|
||||||
|
|
||||||
ctx = sha1_init();
|
ctx = sha1_init();
|
||||||
if (ctx == NULL) {
|
if (ctx == NULL) {
|
||||||
|
Reference in New Issue
Block a user