comparison auth.h @ 249:efbaf6b03837

added keyboard-interactive client support
author Matt Johnston <matt@ucc.asn.au>
date Tue, 20 Sep 2005 17:35:21 +0000
parents bf64e666f99b
children 475a818dd6e7
comparison
equal deleted inserted replaced
248:bf64e666f99b 249:efbaf6b03837
39 void svr_auth_pam(); 39 void svr_auth_pam();
40 40
41 /* Client functions */ 41 /* Client functions */
42 void recv_msg_userauth_failure(); 42 void recv_msg_userauth_failure();
43 void recv_msg_userauth_success(); 43 void recv_msg_userauth_success();
44 void recv_msg_userauth_specific_60();
44 void recv_msg_userauth_pk_ok(); 45 void recv_msg_userauth_pk_ok();
46 void recv_msg_userauth_info_request();
45 void cli_get_user(); 47 void cli_get_user();
46 void cli_auth_getmethods(); 48 void cli_auth_getmethods();
47 void cli_auth_try(); 49 void cli_auth_try();
48 void recv_msg_userauth_banner(); 50 void recv_msg_userauth_banner();
49 void cli_pubkeyfail(); 51 void cli_pubkeyfail();
50 int cli_auth_password(); 52 void cli_auth_password();
51 int cli_auth_pubkey(); 53 int cli_auth_pubkey();
54 void cli_auth_interactive();
52 55
53 56
54 #define MAX_USERNAME_LEN 25 /* arbitrary for the moment */ 57 #define MAX_USERNAME_LEN 25 /* arbitrary for the moment */
55 58
56 #define AUTH_TYPE_PUBKEY 1 << 0 59 #define AUTH_TYPE_NONE 1
57 #define AUTH_TYPE_PASSWORD 1 << 1 60 #define AUTH_TYPE_PUBKEY 1 << 1
61 #define AUTH_TYPE_PASSWORD 1 << 2
62 #define AUTH_TYPE_INTERACT 1 << 3
58 63
59 /* auth types, "none" means we should return list of acceptable types */ 64 #define AUTH_METHOD_NONE "none"
60 #define AUTH_METHOD_NONE "none"
61 #define AUTH_METHOD_NONE_LEN 4 65 #define AUTH_METHOD_NONE_LEN 4
62 #define AUTH_METHOD_PUBKEY "publickey" 66 #define AUTH_METHOD_PUBKEY "publickey"
63 #define AUTH_METHOD_PUBKEY_LEN 9 67 #define AUTH_METHOD_PUBKEY_LEN 9
64 #define AUTH_METHOD_PASSWORD "password" 68 #define AUTH_METHOD_PASSWORD "password"
65 #define AUTH_METHOD_PASSWORD_LEN 8 69 #define AUTH_METHOD_PASSWORD_LEN 8
70 #define AUTH_METHOD_INTERACT "keyboard-interactive"
71 #define AUTH_METHOD_INTERACT_LEN 20
72
73
66 74
67 /* This structure is shared between server and client - it contains 75 /* This structure is shared between server and client - it contains
68 * relatively little extraneous bits when used for the client rather than the 76 * relatively little extraneous bits when used for the client rather than the
69 * server */ 77 * server */
70 struct AuthState { 78 struct AuthState {