From a033b93c616f4a81afc3fc6a017396d507d96c19 Mon Sep 17 00:00:00 2001 From: "Artyom V. Poptsov" Date: Mon, 29 Sep 2014 07:18:21 +0400 Subject: 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 Reviewed-by: Andreas Schneider (cherry picked from commit aaae6cd97d3b99061fcf5444d491895690fb4cde) --- src/pki_gcrypt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pki_gcrypt.c b/src/pki_gcrypt.c index e696e422..f78f28b2 100644 --- a/src/pki_gcrypt.c +++ b/src/pki_gcrypt.c @@ -1657,6 +1657,7 @@ ssh_signature pki_do_sign_sessionid(const ssh_key key, return NULL; } sig->type = key->type; + sig->type_c = key->type_c; switch(key->type) { case SSH_KEYTYPE_DSS: -- cgit v1.2.3