00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef AUTH_H_
00023 #define AUTH_H_
00024 #include "config.h"
00025 #include "libssh/callbacks.h"
00026
00027 SSH_PACKET_CALLBACK(ssh_packet_userauth_banner);
00028 SSH_PACKET_CALLBACK(ssh_packet_userauth_failure);
00029 SSH_PACKET_CALLBACK(ssh_packet_userauth_success);
00030 SSH_PACKET_CALLBACK(ssh_packet_userauth_pk_ok);
00031 SSH_PACKET_CALLBACK(ssh_packet_userauth_info_request);
00032
00033 #ifdef WITH_SSH1
00034 void ssh_auth1_handler(ssh_session session, uint8_t type);
00035
00036
00037 int ssh_userauth1_none(ssh_session session, const char *username);
00038 int ssh_userauth1_offer_pubkey(ssh_session session, const char *username,
00039 int type, ssh_string pubkey);
00040 int ssh_userauth1_password(ssh_session session, const char *username,
00041 const char *password);
00042
00043
00044 #endif
00045
00050 enum ssh_auth_state_e {
00052 SSH_AUTH_STATE_NONE=0,
00054 SSH_AUTH_STATE_PARTIAL,
00056 SSH_AUTH_STATE_SUCCESS,
00058 SSH_AUTH_STATE_FAILED,
00060 SSH_AUTH_STATE_ERROR,
00062 SSH_AUTH_STATE_INFO,
00064 SSH_AUTH_STATE_PK_OK,
00066 SSH_AUTH_STATE_KBDINT_SENT
00067
00068 };
00069
00073 enum ssh_auth_service_state_e {
00075 SSH_AUTH_SERVICE_NONE=0,
00077 SSH_AUTH_SERVICE_SENT,
00079 SSH_AUTH_SERVICE_ACCEPTED,
00081 SSH_AUTH_SERVICE_DENIED,
00083 SSH_AUTH_SERVICE_USER_SENT
00084 };
00085
00086 #endif