aboutsummaryrefslogtreecommitdiff
path: root/libssh
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2009-02-06 12:51:37 +0000
committerAndreas Schneider <mail@cynapses.org>2009-02-06 12:51:37 +0000
commitf4bbc45bbe7cc5caa494d89c03681cdacb3c63a6 (patch)
tree47f9431736ac089a60096c184813c048d87e3293 /libssh
parentff19095415f94e99dde514ac5be64fda51caced1 (diff)
downloadlibssh-f4bbc45bbe7cc5caa494d89c03681cdacb3c63a6.tar.gz
libssh-f4bbc45bbe7cc5caa494d89c03681cdacb3c63a6.tar.xz
libssh-f4bbc45bbe7cc5caa494d89c03681cdacb3c63a6.zip
Add missing ifdef for ssh-agent support.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@234 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'libssh')
-rw-r--r--libssh/auth.c7
-rw-r--r--libssh/keys.c2
2 files changed, 5 insertions, 4 deletions
diff --git a/libssh/auth.c b/libssh/auth.c
index 3b865b83..0bd67903 100644
--- a/libssh/auth.c
+++ b/libssh/auth.c
@@ -332,6 +332,7 @@ int ssh_userauth_pubkey(SSH_SESSION *session, const char *username, STRING *publ
return err;
}
+#ifdef _WIN32
/** \brief Try to authenticate through public key with ssh agent
* \param session ssh session
* \param username username to authenticate. You can specify NULL if
@@ -392,10 +393,7 @@ int ssh_userauth_agent_pubkey(SSH_SESSION *session, const char *username,
buffer_add_u8(session->out_buffer, 1);
buffer_add_ssh_string(session->out_buffer, algo);
buffer_add_ssh_string(session->out_buffer, key);
-#if 0
- sign=ssh_do_sign(session,session->out_buffer,privatekey);
- sign = agent_sign_data(session, session->out_buffer, publickey);
-#endif
+
sign = ssh_do_sign_with_agent(session, session->out_buffer, publickey);
if (sign) {
@@ -412,6 +410,7 @@ int ssh_userauth_agent_pubkey(SSH_SESSION *session, const char *username,
return err;
}
+#endif /* _WIN32 */
/** \brief Try to authenticate by password
* \param session ssh session
diff --git a/libssh/keys.c b/libssh/keys.c
index 406bcdd8..f616c80f 100644
--- a/libssh/keys.c
+++ b/libssh/keys.c
@@ -620,6 +620,7 @@ static STRING *RSA_do_sign(void *payload,int len,RSA *privkey){
}
#endif
+#ifdef _WIN32
STRING *ssh_do_sign_with_agent(struct ssh_session *session,
struct buffer_struct *buf, struct public_key_struct *publickey) {
struct buffer_struct *sigbuf = NULL;
@@ -651,6 +652,7 @@ STRING *ssh_do_sign_with_agent(struct ssh_session *session,
return signature;
}
+#endif /* _WIN32 */
/* this function signs the session id (known as H) as a string then the content of sigbuf */
STRING *ssh_do_sign(SSH_SESSION *session,BUFFER *sigbuf, PRIVATE_KEY *privatekey){