I did this
The man page for CURLOPT_SSH_PRIVATE_KEYFILE states:
If not used, libcurl defaults to $HOME/.ssh/id_rsa or $HOME/.ssh/id_dsa if the HOME environment variable is set, and in the current directory if HOME is not set.
But it turns out this is only true for the libssh2 backend. The libssh alternative makes no such attempt.
Relying on the HOME environment variable and checking for the presence of files were always odd things for libcurl to do, but having the two backends act differently in this regard is an outright bug.
I am tempted to remove the reliance of HOME and go with the libssh take for both, but I'm scared that will break too many applications.
I expected the following
Both backends to act similarly and as documented.
curl/libcurl version
git master but since a long time back
operating system
independent
I did this
The man page for
CURLOPT_SSH_PRIVATE_KEYFILEstates:But it turns out this is only true for the libssh2 backend. The libssh alternative makes no such attempt.
Relying on the
HOMEenvironment variable and checking for the presence of files were always odd things for libcurl to do, but having the two backends act differently in this regard is an outright bug.I am tempted to remove the reliance of HOME and go with the libssh take for both, but I'm scared that will break too many applications.
I expected the following
Both backends to act similarly and as documented.
curl/libcurl version
git master but since a long time back
operating system
independent