From 7cb6b15aaaf49e50ba47bf5d3c02b91d18254fbd Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Mon, 4 Mar 2013 00:36:55 +0100 Subject: auth: implement client-side gssapi Reviewed-by: Andreas Schneider --- examples/authentication.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'examples/authentication.c') 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); -- cgit