summaryrefslogtreecommitdiffstats
path: root/examples/authentication.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2014-01-16 15:27:46 +0100
committerAndreas Schneider <asn@cryptomilk.org>2014-01-16 15:27:46 +0100
commit2fe59071b242c6104d765b87d99f94bbf377545d (patch)
treece70bfbfc731fa1c14c6e69c40819e4c0d5a7c02 /examples/authentication.c
parenta7157b790714be3a5df112716bfd150ceb99ace7 (diff)
downloadlibssh-2fe59071b242c6104d765b87d99f94bbf377545d.tar.gz
libssh-2fe59071b242c6104d765b87d99f94bbf377545d.tar.xz
libssh-2fe59071b242c6104d765b87d99f94bbf377545d.zip
src: Do not use deprecated functions.
Diffstat (limited to 'examples/authentication.c')
-rw-r--r--examples/authentication.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/authentication.c b/examples/authentication.c
index ab5e64d6..b9f70f5b 100644
--- a/examples/authentication.c
+++ b/examples/authentication.c
@@ -116,7 +116,7 @@ int authenticate_console(ssh_session session){
return rc;
}
- method = ssh_auth_list(session);
+ method = ssh_userauth_list(session, NULL);
while (rc != SSH_AUTH_SUCCESS) {
if (method & SSH_AUTH_METHOD_GSSAPI_MIC){
rc = ssh_userauth_gssapi(session);
@@ -129,10 +129,10 @@ int authenticate_console(ssh_session session){
}
// Try to authenticate with public key first
if (method & SSH_AUTH_METHOD_PUBLICKEY) {
- rc = ssh_userauth_autopubkey(session, NULL);
+ rc = ssh_userauth_publickey_auto(session, NULL, NULL);
if (rc == SSH_AUTH_ERROR) {
- error(session);
- return rc;
+ error(session);
+ return rc;
} else if (rc == SSH_AUTH_SUCCESS) {
break;
}