aboutsummaryrefslogtreecommitdiff
path: root/src/pki_gcrypt.c
diff options
context:
space:
mode:
authorArtyom V. Poptsov <poptsov.artyom@gmail.com>2014-09-29 07:18:21 +0400
committerAndreas Schneider <asn@cryptomilk.org>2014-10-02 08:30:17 +0200
commitaaae6cd97d3b99061fcf5444d491895690fb4cde (patch)
tree1e8c940daaec7d00d4bc601cbb232707011f6539 /src/pki_gcrypt.c
parent509676e3a4743efb42fe050359cf5b0b3b5f2642 (diff)
downloadlibssh-aaae6cd97d3b99061fcf5444d491895690fb4cde.tar.gz
libssh-aaae6cd97d3b99061fcf5444d491895690fb4cde.tar.xz
libssh-aaae6cd97d3b99061fcf5444d491895690fb4cde.zip
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>
Diffstat (limited to 'src/pki_gcrypt.c')
-rw-r--r--src/pki_gcrypt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pki_gcrypt.c b/src/pki_gcrypt.c
index fff5237c..2811acce 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: