Made the server DH asynchronous.

It still needs testing and cleanup, it was done with less
care than the client-side.
The socket listening and connexion is still synchronous
This commit is contained in:
Aris Adamantiadis
2010-01-06 22:49:40 +01:00
parent ef5dc6cd2b
commit 84ec17964e
4 changed files with 91 additions and 69 deletions

View File

@@ -245,6 +245,9 @@ int gettimeofday(struct timeval *__p, void *__t);
char *dir_expand_dup(ssh_session session, const char *value, int allowsshdir);
int ssh_options_set_algo(ssh_session session, int algo, const char *list);
/* server.c */
SSH_PACKET_CALLBACK(ssh_packet_kexdh_init);
/** Free memory space */
#define SAFE_FREE(x) do { if ((x) != NULL) {free(x); x=NULL;} } while(0)

View File

@@ -43,6 +43,12 @@ enum ssh_session_state_e {
SSH_SESSION_STATE_ERROR
};
enum ssh_dh_state_e {
DH_STATE_INIT,
DH_STATE_INIT_SENT,
DH_STATE_NEWKEYS_SENT,
DH_STATE_FINISHED
};
struct ssh_session_struct {
struct error_struct error;