1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-08-08 19:02:06 +03:00

pki_gcrypt: Initialize 'type_c' in 'pki_do_sign_sessionid'

Add missing initialization of 'type_c' field of a SSH signature in
'pki_do_sign_sessionid' procedure.

If libssh is compiled with GCrypt, 'dh_handshake_server' fails with
"Could not sign the session id" error.  The change fixes that.

Signed-off-by: Artyom V. Poptsov <poptsov.artyom@gmail.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit aaae6cd97d)
This commit is contained in:
Artyom V. Poptsov
2014-09-29 07:18:21 +04:00
committed by Andreas Schneider
parent b7856780a9
commit a033b93c61

View File

@@ -1657,6 +1657,7 @@ ssh_signature pki_do_sign_sessionid(const ssh_key key,
return NULL; return NULL;
} }
sig->type = key->type; sig->type = key->type;
sig->type_c = key->type_c;
switch(key->type) { switch(key->type) {
case SSH_KEYTYPE_DSS: case SSH_KEYTYPE_DSS: