aboutsummaryrefslogtreecommitdiff
path: root/tests/data/test664
diff options
context:
space:
mode:
authorJay Satiro <raysatiro@yahoo.com>2020-02-23 18:37:09 -0500
committerJay Satiro <raysatiro@yahoo.com>2020-03-07 03:06:11 -0500
commit09aa807240b9dcde78a919ff712316a1daf0655e (patch)
treef94d596f877bd3b95aa0933e88b3af0f02bd6b40 /tests/data/test664
parente54b1885d19dee5ed04761295020a0a84b8296ca (diff)
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
Diffstat (limited to 'tests/data/test664')
-rw-r--r--tests/data/test66444
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/data/test664 b/tests/data/test664
new file mode 100644
index 000000000..cb73b248b
--- /dev/null
+++ b/tests/data/test664
@@ -0,0 +1,44 @@
+<testcase>
+<info>
+<keywords>
+SFTP
+server key check
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+test
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+sftp
+</server>
+ <name>
+SFTP correct host key
+ </name>
+ <command>
+--hostpubmd5 %SSHSRVMD5 --key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/file664.txt
+</command>
+<file name="log/file664.txt">
+test
+</file>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+0
+</errorcode>
+<valgrind>
+disable
+</valgrind>
+</verify>
+</testcase>