diff options
author | Justus Winter <justus@g10code.com> | 2015-12-04 15:19:07 +0100 |
---|---|---|
committer | Justus Winter <justus@g10code.com> | 2017-05-24 17:01:48 +0200 |
commit | 3ac1a9d3a018816233a855faff059b4e0657a0f1 (patch) | |
tree | 21505b72fe2daf560ec214120612bd2286611fe7 /common/t-ssh-utils.c | |
parent | Register DCO for William L. Thomson Jr. (diff) | |
download | gnupg2-3ac1a9d3a018816233a855faff059b4e0657a0f1.tar.xz gnupg2-3ac1a9d3a018816233a855faff059b4e0657a0f1.zip |
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 <justus@g10code.com>
Diffstat (limited to 'common/t-ssh-utils.c')
-rw-r--r-- | common/t-ssh-utils.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) { |