1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

ssh: check md5 fingerprints case insensitively (regression)

Revert the change from ce8d09483e but use the new function

Reported-by: Kamil Dudka
Bug: ce8d09483e (commitcomment-19666146)
This commit is contained in:
Daniel Stenberg 2016-11-07 12:54:40 +01:00
parent a110a03b43
commit 50aded1cd4

View File

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