diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-10-17 18:10:42 +0200 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-10-17 18:10:42 +0200 |
commit | 27d25752e93c19d3e6584915bd64b72e43f3afc0 (patch) | |
tree | 71a2bdb816c7f885a3d4a21e264f9f7d1bb49fa3 /libssh/auth.c | |
parent | a479b302983aae2878af0cb50eac141ede6cd942 (diff) | |
download | libssh-27d25752e93c19d3e6584915bd64b72e43f3afc0.tar.gz libssh-27d25752e93c19d3e6584915bd64b72e43f3afc0.tar.xz libssh-27d25752e93c19d3e6584915bd64b72e43f3afc0.zip |
Allow use of SSH_DIR/ when expanding key paths
Diffstat (limited to 'libssh/auth.c')
-rw-r--r-- | libssh/auth.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/libssh/auth.c b/libssh/auth.c index d03f8f14..c79d1642 100644 --- a/libssh/auth.c +++ b/libssh/auth.c @@ -757,12 +757,12 @@ error: } #ifdef _MSC_VER -static const char privKey_1[] = "%s/.ssh/identity"; -static const char pubKey_1[] = "%s/.ssh/identity.pub"; -static const char privKey_2[] = "%s/.ssh/id_dsa"; -static const char pubKey_2[] = "%s/.ssh/id_dsa.pub"; -static const char privKey_3[] = "%s/.ssh/id_rsa"; -static const char pubKey_3[] = "%s/.ssh/id_rsa.pub"; +static const char privKey_1[] = "SSH_DIR/identity"; +static const char pubKey_1[] = "SSH_DIR/identity.pub"; +static const char privKey_2[] = "SSH_DIR/id_dsa"; +static const char pubKey_2[] = "SSH_DIR/id_dsa.pub"; +static const char privKey_3[] = "SSH_DIR/id_rsa"; +static const char pubKey_3[] = "SSH_DIR/id_rsa.pub"; /** Used different var to allow const char[] declaration */ static struct ssh_keys_struct keytab[] = { { privKey_1, pubKey_1}, @@ -774,16 +774,16 @@ static struct ssh_keys_struct keytab[] = { /* This requires GCC extensions */ static struct ssh_keys_struct keytab[] = { { - .privatekey = "identity", - .publickey = "identity.pub" + .privatekey = "SSH_DIR/identity", + .publickey = "SSH_DIR/identity.pub" }, { - .privatekey = "id_dsa", - .publickey = "id_dsa.pub", + .privatekey = "SSH_DIR/id_dsa", + .publickey = "SSH_DIR/id_dsa.pub", }, { - .privatekey = "id_rsa", - .publickey = "id_rsa.pub", + .privatekey = "SSH_DIR/id_rsa", + .publickey = "SSH_DIR/id_rsa.pub", }, { .privatekey = NULL, |