summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/libssh/legacy.h1
-rw-r--r--include/libssh/libssh.h1
-rw-r--r--include/libssh/libsshpp.hpp10
3 files changed, 3 insertions, 9 deletions
diff --git a/include/libssh/legacy.h b/include/libssh/legacy.h
index 1905e89..9e5c9f0 100644
--- a/include/libssh/legacy.h
+++ b/include/libssh/legacy.h
@@ -32,6 +32,7 @@
#define LEGACY_H_
LIBSSH_API int ssh_auth_list(ssh_session session);
LIBSSH_API int ssh_userauth_offer_pubkey(ssh_session session, const char *username, int type, ssh_string publickey);
+LIBSSH_API int ssh_userauth_pubkey(ssh_session session, const char *username, ssh_string publickey, ssh_private_key privatekey);
LIBSSH_API void buffer_free(ssh_buffer buffer);
LIBSSH_API void *buffer_get(ssh_buffer buffer);
diff --git a/include/libssh/libssh.h b/include/libssh/libssh.h
index 01d6c52..acf1292 100644
--- a/include/libssh/libssh.h
+++ b/include/libssh/libssh.h
@@ -516,7 +516,6 @@ LIBSSH_API const char *ssh_userauth_kbdint_getanswer(ssh_session session, unsign
LIBSSH_API int ssh_userauth_kbdint_setanswer(ssh_session session, unsigned int i,
const char *answer);
LIBSSH_API int ssh_userauth_password(ssh_session session, const char *username, const char *password);
-LIBSSH_API int ssh_userauth_pubkey(ssh_session session, const char *username, ssh_string publickey, ssh_private_key privatekey);
LIBSSH_API int ssh_userauth_privatekey_file(ssh_session session, const char *username,
const char *filename, const char *passphrase);
LIBSSH_API const char *ssh_version(int req_version);
diff --git a/include/libssh/libsshpp.hpp b/include/libssh/libsshpp.hpp
index 3c82e58..70d7db0 100644
--- a/include/libssh/libsshpp.hpp
+++ b/include/libssh/libsshpp.hpp
@@ -219,19 +219,13 @@ public:
return ret;
}
/** @brief Authenticates using the publickey method.
- * @param[in] pubkey public key to use for authentication
* @param[in] privkey private key to use for authentication
* @throws SshException on error
* @returns SSH_AUTH_SUCCESS, SSH_AUTH_PARTIAL, SSH_AUTH_DENIED
* @see ssh_userauth_pubkey
*/
- int userauthPubkey(ssh_string pubkey, ssh_private_key privkey){
- int ret=ssh_userauth_pubkey(c_session,NULL,pubkey,privkey);
- ssh_throw(ret);
- return ret;
- }
- int userauthPubkey(ssh_private_key privkey){
- int ret=ssh_userauth_pubkey(c_session,NULL,NULL,privkey);
+ int userauthPublickey(ssh_key privkey){
+ int ret=ssh_userauth_publickey(c_session, NULL, privkey);
ssh_throw(ret);
return ret;
}