vssh: keyfile use cleanups

- make the libssh backend do the same fallback for private and public key
  filename as libssh2 already did and is documented behavior. This now uses a
  common function.

- set the file names already in setup_connection if public key auth is
  requested, so that the connection reuse functions can use the
  information when checking for existing connections to reuse

- rename the oddly named struct fields 'rsa' to 'priv_key' and 'rsa_pub'
  to 'pub_key' to better reflect their purposes

Fixes #22243
Closes #22244
This commit is contained in:
Daniel Stenberg 2026-07-02 09:07:05 +02:00
parent d3a7e57157
commit c7f67be010
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
6 changed files with 112 additions and 107 deletions

View file

@ -29,6 +29,8 @@
#include "urldata.h"
struct ssh_conn;
CURLcode Curl_getworkingpath(struct Curl_easy *data,
const char *homedir,
char **path);
@ -40,5 +42,7 @@ CURLcode Curl_ssh_range(struct Curl_easy *data,
curl_off_t *startp, curl_off_t *sizep);
CURLcode Curl_ssh_pollset(struct Curl_easy *data, struct easy_pollset *ps);
CURLcode Curl_ssh_setup_pkey(struct Curl_easy *data, struct ssh_conn *sshc);
#endif /* USE_SSH */
#endif /* HEADER_CURL_VSSH_VSSH_H */