]> granicus.if.org Git - curl/commitdiff
ssh: check md5 fingerprints case insensitively (regression)
authorDaniel Stenberg <daniel@haxx.se>
Mon, 7 Nov 2016 11:54:40 +0000 (12:54 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 7 Nov 2016 11:54:40 +0000 (12:54 +0100)
Revert the change from ce8d09483eea but use the new function

Reported-by: Kamil Dudka
Bug: https://github.com/curl/curl/commit/ce8d09483eea2fcb1b50e323e1a8ed1f3613b2e3#commitcomment-19666146

lib/ssh.c

index 43c82839d39756d6a19e7aac1e6d2ec45940afec..0df030d27fc67c7b78020d24b57d087256ed68c1 100644 (file)
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -676,7 +676,7 @@ static CURLcode ssh_check_fingerprint(struct connectdata *conn)
    * against a known fingerprint, if available.
    */
   if(pubkey_md5 && strlen(pubkey_md5) == 32) {
-    if(!fingerprint || strcmp(md5buffer, pubkey_md5)) {
+    if(!fingerprint || !strcasecompare(md5buffer, pubkey_md5)) {
       if(fingerprint)
         failf(data,
             "Denied establishing ssh session: mismatch md5 fingerprint. "