From 3ac1a9d3a018816233a855faff059b4e0657a0f1 Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Fri, 4 Dec 2015 15:19:07 +0100 Subject: common: Support different digest algorithms for ssh fingerprints. * common/ssh-utils.c (get_fingerprint): Add and honor 'algo' parameter. (ssh_get_fingerprint{,_string}): Likewise. * common/ssh-utils.h (ssh_get_fingerprint{,_string}): Update prototypes. * common/t-ssh-utils.c (main): Adapt accordingly. * agent/command-ssh.c (agent_raw_key_from_file): Likewise. (ssh_identity_register): Likewise. * agent/command.c (do_one_keyinfo): Likewise. * agent/findkey.c (modify_description): Likewise. -- This lays the foundation to support other algorithms. GnuPG-bug-id: 2106 Signed-off-by: Justus Winter --- common/t-ssh-utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'common/t-ssh-utils.c') diff --git a/common/t-ssh-utils.c b/common/t-ssh-utils.c index f63ea95ac..a4e948fe6 100644 --- a/common/t-ssh-utils.c +++ b/common/t-ssh-utils.c @@ -262,7 +262,7 @@ main (int argc, char **argv) if (argc == 2) { key = read_key (argv[1]); - err = ssh_get_fingerprint_string (key, &string); + err = ssh_get_fingerprint_string (key, GCRY_MD_MD5, &string); if (err) { fprintf (stderr, "%s:%d: error getting fingerprint: %s\n", @@ -287,7 +287,7 @@ main (int argc, char **argv) exit (1); } - err = ssh_get_fingerprint_string (key, &string); + err = ssh_get_fingerprint_string (key, GCRY_MD_MD5, &string); gcry_sexp_release (key); if (err) { -- cgit v1.2.3