aboutsummaryrefslogtreecommitdiff
path: root/src/pki_gcrypt.c
diff options
context:
space:
mode:
authorJakub Jelen <jjelen@redhat.com>2018-11-22 10:38:30 +0100
committerAndreas Schneider <asn@cryptomilk.org>2018-11-30 16:20:19 +0100
commit7f83a1efae6a7da19e18268d6298fc11b4e68c57 (patch)
tree55c1f3eecf6ac4dd6e4dbfd9e464b49e3c91d3fc /src/pki_gcrypt.c
parent7b725e6bc7abdc38c32a1ae26081a44a2c267ce4 (diff)
downloadlibssh-7f83a1efae6a7da19e18268d6298fc11b4e68c57.tar.gz
libssh-7f83a1efae6a7da19e18268d6298fc11b4e68c57.tar.xz
libssh-7f83a1efae6a7da19e18268d6298fc11b4e68c57.zip
pki: Set correct type for imported signatures
Issue reported by Tilo Eckert <tilo.eckert@flam.de> Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src/pki_gcrypt.c')
-rw-r--r--src/pki_gcrypt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pki_gcrypt.c b/src/pki_gcrypt.c
index e0c356b8..ff60dc67 100644
--- a/src/pki_gcrypt.c
+++ b/src/pki_gcrypt.c
@@ -1855,7 +1855,7 @@ ssh_signature pki_signature_from_blob(const ssh_key pubkey,
sig->type = type;
sig->hash_type = hash_type;
- sig->type_c = ssh_key_signature_to_char(type, hash_type);
+ sig->type_c = pubkey->type_c; /* for all types but RSA */
len = ssh_string_len(sig_blob);
@@ -1921,6 +1921,7 @@ ssh_signature pki_signature_from_blob(const ssh_key pubkey,
ssh_signature_free(sig);
return NULL;
}
+ sig->type_c = ssh_key_signature_to_char(type, hash_type);
break;
case SSH_KEYTYPE_ED25519:
rc = pki_ed25519_sig_from_blob(sig, sig_blob);