aboutsummaryrefslogtreecommitdiff
path: root/examples/authentication.c
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2013-03-04 00:36:55 +0100
committerAndreas Schneider <asn@cryptomilk.org>2013-07-13 14:41:20 +0200
commit7cb6b15aaaf49e50ba47bf5d3c02b91d18254fbd (patch)
treec80a99f3f05097ca7fdcf35f19bb3642a0255bad /examples/authentication.c
parent212261bb10a84be4651d18a7cd99f40f4f2bf9eb (diff)
downloadlibssh-7cb6b15aaaf49e50ba47bf5d3c02b91d18254fbd.tar.gz
libssh-7cb6b15aaaf49e50ba47bf5d3c02b91d18254fbd.tar.xz
libssh-7cb6b15aaaf49e50ba47bf5d3c02b91d18254fbd.zip
auth: implement client-side gssapi
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'examples/authentication.c')
-rw-r--r--examples/authentication.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/examples/authentication.c b/examples/authentication.c
index 0e749e54..ab5e64d6 100644
--- a/examples/authentication.c
+++ b/examples/authentication.c
@@ -118,6 +118,15 @@ int authenticate_console(ssh_session session){
method = ssh_auth_list(session);
while (rc != SSH_AUTH_SUCCESS) {
+ if (method & SSH_AUTH_METHOD_GSSAPI_MIC){
+ rc = ssh_userauth_gssapi(session);
+ if(rc == SSH_AUTH_ERROR) {
+ error(session);
+ return rc;
+ } else if (rc == SSH_AUTH_SUCCESS) {
+ break;
+ }
+ }
// Try to authenticate with public key first
if (method & SSH_AUTH_METHOD_PUBLICKEY) {
rc = ssh_userauth_autopubkey(session, NULL);