mirror of
https://github.com/curl/curl.git
synced 2026-08-25 08:43:31 +03:00
libssh: add support for SHA256 host public keys
Reported-by: Joshua Rogers Fixes #21605 Closes #21607
This commit is contained in:
parent
9135294115
commit
eb9b253d66
11 changed files with 85 additions and 48 deletions
12
lib/setopt.c
12
lib/setopt.c
|
|
@ -2342,6 +2342,12 @@ static CURLcode setopt_cptr(struct Curl_easy *data, CURLoption option,
|
|||
* for validation purposes.
|
||||
*/
|
||||
return Curl_setstropt(&s->str[STRING_SSH_HOST_PUBLIC_KEY_MD5], ptr);
|
||||
case CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256:
|
||||
/*
|
||||
* Option to allow for the SHA256 of the host public key to be checked
|
||||
* for validation purposes.
|
||||
*/
|
||||
return Curl_setstropt(&s->str[STRING_SSH_HOST_PUBLIC_KEY_SHA256], ptr);
|
||||
case CURLOPT_SSH_KNOWNHOSTS:
|
||||
/*
|
||||
* Store the filename to read known hosts from.
|
||||
|
|
@ -2349,12 +2355,6 @@ static CURLcode setopt_cptr(struct Curl_easy *data, CURLoption option,
|
|||
return Curl_setstropt(&s->str[STRING_SSH_KNOWNHOSTS], ptr);
|
||||
#endif
|
||||
#ifdef USE_LIBSSH2
|
||||
case CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256:
|
||||
/*
|
||||
* Option to allow for the SHA256 of the host public key to be checked
|
||||
* for validation purposes.
|
||||
*/
|
||||
return Curl_setstropt(&s->str[STRING_SSH_HOST_PUBLIC_KEY_SHA256], ptr);
|
||||
case CURLOPT_SSH_HOSTKEYDATA:
|
||||
/*
|
||||
* Custom client data to pass to the SSH keyfunc callback
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue