aboutsummaryrefslogtreecommitdiff
path: root/include
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 /include
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 'include')
-rw-r--r--include/libssh/auth.h9
-rw-r--r--include/libssh/gssapi.h6
-rw-r--r--include/libssh/libssh.h1
-rw-r--r--include/libssh/session.h3
4 files changed, 16 insertions, 3 deletions
diff --git a/include/libssh/auth.h b/include/libssh/auth.h
index 3a6012ec..2c0012b0 100644
--- a/include/libssh/auth.h
+++ b/include/libssh/auth.h
@@ -83,8 +83,13 @@ enum ssh_auth_state_e {
/** Last state was a public key accepted for authentication */
SSH_AUTH_STATE_PK_OK,
/** We asked for a keyboard-interactive authentication */
- SSH_AUTH_STATE_KBDINT_SENT
-
+ SSH_AUTH_STATE_KBDINT_SENT,
+ /** We have sent an userauth request with gssapi-with-mic */
+ SSH_AUTH_STATE_GSSAPI_REQUEST_SENT,
+ /** We are exchanging tokens until authentication */
+ SSH_AUTH_STATE_GSSAPI_TOKEN,
+ /** We have sent the MIC and expecting to be authenticated */
+ SSH_AUTH_STATE_GSSAPI_MIC_SENT,
};
/** @internal
diff --git a/include/libssh/gssapi.h b/include/libssh/gssapi.h
index 688590bd..ad85e948 100644
--- a/include/libssh/gssapi.h
+++ b/include/libssh/gssapi.h
@@ -32,7 +32,13 @@ typedef struct ssh_gssapi_struct *ssh_gssapi;
#ifdef WITH_SERVER
int ssh_gssapi_handle_userauth(ssh_session session, const char *user, uint32_t n_oid, ssh_string *oids);
SSH_PACKET_CALLBACK(ssh_packet_userauth_gssapi_token);
+SSH_PACKET_CALLBACK(ssh_packet_userauth_gssapi_token_server);
+SSH_PACKET_CALLBACK(ssh_packet_userauth_gssapi_token_client);
SSH_PACKET_CALLBACK(ssh_packet_userauth_gssapi_mic);
+SSH_PACKET_CALLBACK(ssh_packet_userauth_gssapi_response);
+
#endif /* WITH_SERVER */
+int ssh_gssapi_auth_mic(ssh_session session);
+
#endif /* GSSAPI_H */
diff --git a/include/libssh/libssh.h b/include/libssh/libssh.h
index 2c62b2fe..790a5abb 100644
--- a/include/libssh/libssh.h
+++ b/include/libssh/libssh.h
@@ -555,6 +555,7 @@ LIBSSH_API int ssh_userauth_kbdint_getnanswers(ssh_session session);
LIBSSH_API const char *ssh_userauth_kbdint_getanswer(ssh_session session, unsigned int i);
LIBSSH_API int ssh_userauth_kbdint_setanswer(ssh_session session, unsigned int i,
const char *answer);
+LIBSSH_API int ssh_userauth_gssapi(ssh_session session);
LIBSSH_API const char *ssh_version(int req_version);
LIBSSH_API int ssh_write_knownhost(ssh_session session);
diff --git a/include/libssh/session.h b/include/libssh/session.h
index 4764a1ef..dd1091bf 100644
--- a/include/libssh/session.h
+++ b/include/libssh/session.h
@@ -59,7 +59,8 @@ enum ssh_pending_call_e {
SSH_PENDING_CALL_AUTH_PUBKEY,
SSH_PENDING_CALL_AUTH_AGENT,
SSH_PENDING_CALL_AUTH_KBDINT_INIT,
- SSH_PENDING_CALL_AUTH_KBDINT_SEND
+ SSH_PENDING_CALL_AUTH_KBDINT_SEND,
+ SSH_PENDING_CALL_AUTH_GSSAPI_MIC
};
/* libssh calls may block an undefined amount of time */