mirror of
https://github.com/curl/curl.git
synced 2025-01-12 13:55:11 +08:00
libssh2: return error when ssh_hostkeyfunc returns error
return CURLE_PEER_FAILED_VERIFICATION if verification with the callback return a result different than CURLKHMATCH_OK Closes #10034
This commit is contained in:
parent
2b584fffce
commit
8fe33a9661
1
.mailmap
1
.mailmap
@ -100,3 +100,4 @@ zhanghu on xiaomi <zhanghu6@xiaomi.com>
|
||||
Philip Heiduck <pheiduck@Philips-MBP.lan> <47042125+pheiduck@users.noreply.github.com>
|
||||
bsergean on github <bsergean@gmail.com>
|
||||
Stefan Eissing <stefan@eissing.org> <stefan.eissing@greenbytes.de>
|
||||
Michael Musset <mickamusset@gmail.com>
|
||||
|
@ -791,10 +791,14 @@ static CURLcode ssh_check_fingerprint(struct Curl_easy *data)
|
||||
Curl_set_in_callback(data, false);
|
||||
if(rc!= CURLKHMATCH_OK) {
|
||||
state(data, SSH_SESSION_FREE);
|
||||
sshc->actualcode = CURLE_PEER_FAILED_VERIFICATION;
|
||||
return sshc->actualcode;
|
||||
}
|
||||
}
|
||||
else {
|
||||
state(data, SSH_SESSION_FREE);
|
||||
sshc->actualcode = CURLE_PEER_FAILED_VERIFICATION;
|
||||
return sshc->actualcode;
|
||||
}
|
||||
return CURLE_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user