Skip to content

CURLOPT_SSH_PRIVATE_KEYFILE discrapencies #22243

Description

@bagder

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions