From 09aa807240b9dcde78a919ff712316a1daf0655e Mon Sep 17 00:00:00 2001 From: Jay Satiro Date: Sun, 23 Feb 2020 18:37:09 -0500 Subject: libssh: Fix matching user-specified MD5 hex key Prior to this change a match would never be successful because it was mistakenly coded to compare binary data from libssh to a user-specified hex string (ie CURLOPT_SSH_HOST_PUBLIC_KEY_MD5). Reported-by: fds242@users.noreply.github.com Fixes https://github.com/curl/curl/issues/4971 Closes https://github.com/curl/curl/pull/4974 --- tests/sshhelp.pm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/sshhelp.pm') diff --git a/tests/sshhelp.pm b/tests/sshhelp.pm index 248be67a2..e43f86532 100644 --- a/tests/sshhelp.pm +++ b/tests/sshhelp.pm @@ -50,6 +50,7 @@ use vars qw( $sftpcmds $hstprvkeyf $hstpubkeyf + $hstpubmd5f $cliprvkeyf $clipubkeyf @sftppath @@ -82,6 +83,7 @@ use vars qw( $sftpcmds $hstprvkeyf $hstpubkeyf + $hstpubmd5f $cliprvkeyf $clipubkeyf display_sshdconfig @@ -122,6 +124,7 @@ $sftpcmds = 'curl_sftp_cmds'; # sftp client commands batch file $knownhosts = 'curl_client_knownhosts'; # ssh knownhosts file $hstprvkeyf = 'curl_host_rsa_key'; # host private key file $hstpubkeyf = 'curl_host_rsa_key.pub'; # host public key file +$hstpubmd5f = 'curl_host_rsa_key.pub_md5'; # md5 hash of host public key $cliprvkeyf = 'curl_client_key'; # client private key file $clipubkeyf = 'curl_client_key.pub'; # client public key file -- cgit v1.2.3