Fix conflicting declarations of ssh_session and ssh_kbdint.
Этот коммит содержится в:
родитель
5d1fa1be24
Коммит
3b8c4dc750
@ -81,8 +81,8 @@ typedef struct ssh_agent_struct AGENT;
|
||||
#endif
|
||||
|
||||
typedef struct ssh_options_struct SSH_OPTIONS;
|
||||
typedef struct ssh_session SSH_SESSION;
|
||||
typedef struct ssh_kbdint SSH_KBDINT;
|
||||
typedef struct ssh_session_struct SSH_SESSION;
|
||||
typedef struct ssh_kbdint_struct SSH_KBDINT;
|
||||
|
||||
typedef struct ssh_string_struct* ssh_string;
|
||||
typedef struct ssh_buffer_struct* ssh_buffer;
|
||||
@ -91,8 +91,8 @@ typedef struct ssh_private_key_struct* ssh_private_key;
|
||||
typedef struct ssh_options_struct* ssh_options;
|
||||
typedef struct ssh_channel_struct* ssh_channel;
|
||||
typedef struct ssh_agent_struct* ssh_agent;
|
||||
typedef struct ssh_session* ssh_session;
|
||||
typedef struct ssh_kbdint* ssh_kbdint;
|
||||
typedef struct ssh_session_struct* ssh_session;
|
||||
typedef struct ssh_kbdint_struct* ssh_kbdint;
|
||||
|
||||
/* Socket type */
|
||||
#ifdef _WIN32
|
||||
|
@ -337,7 +337,7 @@ struct ssh_keys_struct {
|
||||
|
||||
struct ssh_message;
|
||||
|
||||
struct ssh_session {
|
||||
struct ssh_session_struct {
|
||||
struct error_struct error;
|
||||
struct socket *socket;
|
||||
SSH_OPTIONS *options;
|
||||
@ -391,7 +391,7 @@ struct ssh_session {
|
||||
ssh_agent agent; /* ssh agent */
|
||||
|
||||
/* keyb interactive data */
|
||||
struct ssh_kbdint *kbdint;
|
||||
struct ssh_kbdint_struct *kbdint;
|
||||
int version; /* 1 or 2 */
|
||||
/* server host keys */
|
||||
ssh_private_key rsa_key;
|
||||
@ -400,12 +400,12 @@ struct ssh_session {
|
||||
int auth_methods;
|
||||
int hostkeys; /* contains type of host key wanted by client, in server impl */
|
||||
struct ssh_list *ssh_message_list; /* list of delayed SSH messages */
|
||||
int (*ssh_message_callback)( struct ssh_session *session,struct ssh_message *msg);
|
||||
int (*ssh_message_callback)( struct ssh_session_struct *session,struct ssh_message *msg);
|
||||
int log_verbosity; /*cached copy of the option structure */
|
||||
int log_indent; /* indentation level in enter_function logs */
|
||||
};
|
||||
|
||||
struct ssh_kbdint {
|
||||
struct ssh_kbdint_struct {
|
||||
u32 nprompts;
|
||||
char *name;
|
||||
char *instruction;
|
||||
@ -482,7 +482,7 @@ struct ssh_message {
|
||||
*
|
||||
* @return An allocated ssh agent structure or NULL on error.
|
||||
*/
|
||||
struct ssh_agent_struct *agent_new(struct ssh_session *session);
|
||||
struct ssh_agent_struct *agent_new(struct ssh_session_struct *session);
|
||||
|
||||
void agent_close(struct ssh_agent_struct *agent);
|
||||
|
||||
@ -500,17 +500,17 @@ void agent_free(struct ssh_agent_struct *agent);
|
||||
*
|
||||
* @return 1 if it is running, 0 if not.
|
||||
*/
|
||||
int agent_is_running(struct ssh_session *session);
|
||||
int agent_is_running(struct ssh_session_struct *session);
|
||||
|
||||
int agent_get_ident_count(struct ssh_session *session);
|
||||
int agent_get_ident_count(struct ssh_session_struct *session);
|
||||
|
||||
struct ssh_public_key_struct *agent_get_next_ident(struct ssh_session *session,
|
||||
struct ssh_public_key_struct *agent_get_next_ident(struct ssh_session_struct *session,
|
||||
char **comment);
|
||||
|
||||
struct ssh_public_key_struct *agent_get_first_ident(struct ssh_session *session,
|
||||
struct ssh_public_key_struct *agent_get_first_ident(struct ssh_session_struct *session,
|
||||
char **comment);
|
||||
|
||||
ssh_string agent_sign_data(struct ssh_session *session,
|
||||
ssh_string agent_sign_data(struct ssh_session_struct *session,
|
||||
struct ssh_buffer_struct *data,
|
||||
struct ssh_public_key_struct *pubkey);
|
||||
#endif
|
||||
@ -676,7 +676,7 @@ ssh_public_key publickey_make_rsa(SSH_SESSION *session, ssh_buffer buffer, int t
|
||||
ssh_public_key publickey_from_string(SSH_SESSION *session, ssh_string pubkey_s);
|
||||
SIGNATURE *signature_from_string(SSH_SESSION *session, ssh_string signature,ssh_public_key pubkey,int needed_type);
|
||||
void signature_free(SIGNATURE *sign);
|
||||
ssh_string ssh_do_sign_with_agent(struct ssh_session *session,
|
||||
ssh_string ssh_do_sign_with_agent(struct ssh_session_struct *session,
|
||||
struct ssh_buffer_struct *buf, struct ssh_public_key_struct *publickey);
|
||||
ssh_string ssh_do_sign(SSH_SESSION *session,ssh_buffer sigbuf,
|
||||
ssh_private_key privatekey);
|
||||
|
@ -174,7 +174,7 @@ int ssh_message_service_reply_success(SSH_MESSAGE *msg);
|
||||
char *ssh_message_service_service(SSH_MESSAGE *msg);
|
||||
|
||||
void ssh_set_message_callback(SSH_SESSION *session,
|
||||
int(*ssh_message_callback)(struct ssh_session *session, struct ssh_message *msg));
|
||||
int(*ssh_message_callback)(ssh_session session, struct ssh_message *msg));
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
@ -118,7 +118,7 @@ static size_t atomicio(struct socket *s, void *buf, size_t n, int do_read) {
|
||||
return pos;
|
||||
}
|
||||
|
||||
ssh_agent agent_new(struct ssh_session *session) {
|
||||
ssh_agent agent_new(struct ssh_session_struct *session) {
|
||||
ssh_agent agent = NULL;
|
||||
|
||||
agent = malloc(sizeof(struct ssh_agent_struct));
|
||||
@ -180,7 +180,7 @@ static int agent_connect(SSH_SESSION *session) {
|
||||
}
|
||||
|
||||
#if 0
|
||||
static int agent_decode_reply(struct ssh_session *session, int type) {
|
||||
static int agent_decode_reply(struct ssh_session_struct *session, int type) {
|
||||
switch (type) {
|
||||
case SSH_AGENT_FAILURE:
|
||||
case SSH2_AGENT_FAILURE:
|
||||
@ -199,7 +199,7 @@ static int agent_decode_reply(struct ssh_session *session, int type) {
|
||||
}
|
||||
#endif
|
||||
|
||||
static int agent_talk(struct ssh_session *session,
|
||||
static int agent_talk(struct ssh_session_struct *session,
|
||||
struct ssh_buffer_struct *request, struct ssh_buffer_struct *reply) {
|
||||
u32 len = 0;
|
||||
u8 payload[1024] = {0};
|
||||
@ -262,7 +262,7 @@ static int agent_talk(struct ssh_session *session,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int agent_get_ident_count(struct ssh_session *session) {
|
||||
int agent_get_ident_count(struct ssh_session_struct *session) {
|
||||
ssh_buffer request = NULL;
|
||||
ssh_buffer reply = NULL;
|
||||
unsigned int type = 0;
|
||||
@ -335,7 +335,7 @@ int agent_get_ident_count(struct ssh_session *session) {
|
||||
}
|
||||
|
||||
/* caller has to free commment */
|
||||
struct ssh_public_key_struct *agent_get_first_ident(struct ssh_session *session,
|
||||
struct ssh_public_key_struct *agent_get_first_ident(struct ssh_session_struct *session,
|
||||
char **comment) {
|
||||
if (agent_get_ident_count(session) > 0) {
|
||||
return agent_get_next_ident(session, comment);
|
||||
@ -345,7 +345,7 @@ struct ssh_public_key_struct *agent_get_first_ident(struct ssh_session *session,
|
||||
}
|
||||
|
||||
/* caller has to free commment */
|
||||
struct ssh_public_key_struct *agent_get_next_ident(struct ssh_session *session,
|
||||
struct ssh_public_key_struct *agent_get_next_ident(struct ssh_session_struct *session,
|
||||
char **comment) {
|
||||
struct ssh_public_key_struct *pubkey = NULL;
|
||||
struct ssh_string_struct *blob = NULL;
|
||||
@ -394,7 +394,7 @@ struct ssh_public_key_struct *agent_get_next_ident(struct ssh_session *session,
|
||||
return pubkey;
|
||||
}
|
||||
|
||||
ssh_string agent_sign_data(struct ssh_session *session,
|
||||
ssh_string agent_sign_data(struct ssh_session_struct *session,
|
||||
struct ssh_buffer_struct *data,
|
||||
struct ssh_public_key_struct *pubkey) {
|
||||
struct ssh_string_struct *blob = NULL;
|
||||
|
@ -995,10 +995,10 @@ int ssh_userauth_autopubkey(SSH_SESSION *session, const char *passphrase) {
|
||||
return SSH_AUTH_DENIED;
|
||||
}
|
||||
|
||||
static struct ssh_kbdint *kbdint_new(void) {
|
||||
struct ssh_kbdint *kbd;
|
||||
static ssh_kbdint kbdint_new(void) {
|
||||
ssh_kbdint kbd;
|
||||
|
||||
kbd = malloc(sizeof (struct ssh_kbdint));
|
||||
kbd = malloc(sizeof (struct ssh_kbdint_struct));
|
||||
if (kbd == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
@ -1008,7 +1008,7 @@ static struct ssh_kbdint *kbdint_new(void) {
|
||||
}
|
||||
|
||||
|
||||
static void kbdint_free(struct ssh_kbdint *kbd) {
|
||||
static void kbdint_free(ssh_kbdint kbd) {
|
||||
int i, n;
|
||||
|
||||
if (kbd == NULL) {
|
||||
@ -1039,7 +1039,7 @@ static void kbdint_free(struct ssh_kbdint *kbd) {
|
||||
SAFE_FREE(kbd);
|
||||
}
|
||||
|
||||
static void kbdint_clean(struct ssh_kbdint *kbd) {
|
||||
static void kbdint_clean(ssh_kbdint kbd) {
|
||||
int i, n;
|
||||
|
||||
if (kbd == NULL) {
|
||||
|
@ -594,7 +594,7 @@ void channel_handle(SSH_SESSION *session, int type){
|
||||
*/
|
||||
int channel_default_bufferize(ssh_channel channel, void *data, int len,
|
||||
int is_stderr) {
|
||||
struct ssh_session *session = channel->session;
|
||||
ssh_session session = channel->session;
|
||||
|
||||
ssh_log(session, SSH_LOG_RARE,
|
||||
"placing %d bytes into channel buffer (stderr=%d)", len, is_stderr);
|
||||
|
@ -311,7 +311,7 @@ error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
void ssh_list_kex(struct ssh_session *session, KEX *kex) {
|
||||
void ssh_list_kex(ssh_session session, KEX *kex) {
|
||||
int i = 0;
|
||||
|
||||
#ifdef DEBUG_CRYPTO
|
||||
|
@ -1099,7 +1099,7 @@ static ssh_string RSA_do_sign(const unsigned char *payload, int len, RSA *privke
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32
|
||||
ssh_string ssh_do_sign_with_agent(struct ssh_session *session,
|
||||
ssh_string ssh_do_sign_with_agent(ssh_session session,
|
||||
struct ssh_buffer_struct *buf, struct ssh_public_key_struct *publickey) {
|
||||
struct ssh_buffer_struct *sigbuf = NULL;
|
||||
struct ssh_string_struct *signature = NULL;
|
||||
|
@ -825,7 +825,7 @@ void message_handle(SSH_SESSION *session, u32 type){
|
||||
* must take care of the response).
|
||||
*/
|
||||
void ssh_set_message_callback(SSH_SESSION *session,
|
||||
int(*ssh_message_callback)(struct ssh_session *session, struct ssh_message *msg)){
|
||||
int(*ssh_message_callback)(ssh_session session, struct ssh_message *msg)){
|
||||
session->ssh_message_callback=ssh_message_callback;
|
||||
}
|
||||
|
||||
|
@ -109,7 +109,7 @@ SFTP_SESSION *sftp_server_new(SSH_SESSION *session, ssh_channel chan){
|
||||
}
|
||||
|
||||
int sftp_server_init(SFTP_SESSION *sftp){
|
||||
struct ssh_session *session = sftp->session;
|
||||
ssh_session session = sftp->session;
|
||||
SFTP_PACKET *packet = NULL;
|
||||
ssh_buffer reply = NULL;
|
||||
u32 version;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user