version 1.242, 2016/09/30 09:19:13 |
version 1.243, 2016/10/11 21:47:45 |
|
|
/* SSH1 CRC compensation attack detector */ |
/* SSH1 CRC compensation attack detector */ |
struct deattack_ctx deattack; |
struct deattack_ctx deattack; |
|
|
|
/* Hook for fuzzing inbound packets */ |
|
ssh_packet_hook_fn *hook_in; |
|
void *hook_in_ctx; |
|
|
TAILQ_HEAD(, packet) outgoing; |
TAILQ_HEAD(, packet) outgoing; |
}; |
}; |
|
|
|
|
return NULL; |
return NULL; |
} |
} |
|
|
|
void |
|
ssh_packet_set_input_hook(struct ssh *ssh, ssh_packet_hook_fn *hook, void *ctx) |
|
{ |
|
ssh->state->hook_in = hook; |
|
ssh->state->hook_in_ctx = ctx; |
|
} |
|
|
/* Returns nonzero if rekeying is in progress */ |
/* Returns nonzero if rekeying is in progress */ |
int |
int |
ssh_packet_is_rekeying(struct ssh *ssh) |
ssh_packet_is_rekeying(struct ssh *ssh) |
|
|
return r; |
return r; |
return SSH_ERR_PROTOCOL_ERROR; |
return SSH_ERR_PROTOCOL_ERROR; |
} |
} |
|
if (state->hook_in != NULL && |
|
(r = state->hook_in(ssh, state->incoming_packet, typep, |
|
state->hook_in_ctx)) != 0) |
|
return r; |
if (*typep == SSH2_MSG_USERAUTH_SUCCESS && !state->server_side) |
if (*typep == SSH2_MSG_USERAUTH_SUCCESS && !state->server_side) |
r = ssh_packet_enable_delayed_compress(ssh); |
r = ssh_packet_enable_delayed_compress(ssh); |
else |
else |