1
0
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:
Andreas Schneider
2011-08-29 22:39:47 +02:00
parent 66188f1af8
commit 6bf8dfa073

View File

@@ -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) {