diff --git a/ssh/kex.c b/ssh/kex.c index 0edee79..8807020 100644 --- a/ssh/kex.c +++ b/ssh/kex.c @@ -192,7 +192,7 @@ kex_send_newkeys(struct ssh *ssh) static int kex_input_newkeys(int type, u_int32_t seq, struct ssh *ssh) { - Kex *kex = ssh->kex; + struct kex *kex = ssh->kex; int r; debug("SSH2_MSG_NEWKEYS received"); @@ -212,7 +212,7 @@ int kex_send_kexinit(struct ssh *ssh) { u_char *cookie; - Kex *kex = ssh->kex; + struct kex *kex = ssh->kex; int r; if (kex == NULL) @@ -244,7 +244,7 @@ kex_send_kexinit(struct ssh *ssh) int kex_input_kexinit(int type, u_int32_t seq, struct ssh *ssh) { - Kex *kex = ssh->kex; + struct kex *kex = ssh->kex; const u_char *ptr; u_int i; size_t dlen; @@ -294,9 +294,9 @@ kex_input_kexinit(int type, u_int32_t seq, struct ssh *ssh) } int -kex_new(struct ssh *ssh, char *proposal[PROPOSAL_MAX], Kex **kexp) +kex_new(struct ssh *ssh, char *proposal[PROPOSAL_MAX], struct kex **kexp) { - Kex *kex; + struct kex *kex; int r; *kexp = NULL; @@ -351,7 +351,7 @@ kex_free_newkeys(Newkeys *newkeys) } void -kex_free(Kex *kex) +kex_free(struct kex *kex) { u_int mode; @@ -448,7 +448,7 @@ choose_comp(Comp *comp, char *client, char *server) } static int -choose_kex(Kex *k, char *client, char *server) +choose_kex(struct kex *k, char *client, char *server) { k->name = match_list(client, server, NULL); @@ -478,7 +478,7 @@ choose_kex(Kex *k, char *client, char *server) } static int -choose_hostkeyalg(Kex *k, char *client, char *server) +choose_hostkeyalg(struct kex *k, char *client, char *server) { char *hostkeyalg = match_list(client, server, NULL); @@ -524,7 +524,7 @@ kex_choose_conf(struct ssh *ssh) int nenc, nmac, ncomp; u_int mode, ctos, need; int r, first_kex_follows; - Kex *kex = ssh->kex; + struct kex *kex = ssh->kex; if ((r = kex_buf2prop(kex->my, NULL, &my)) != 0 || (r = kex_buf2prop(kex->peer, &first_kex_follows, &peer)) != 0) @@ -607,7 +607,7 @@ static int derive_key(struct ssh *ssh, int id, u_int need, u_char *hash, u_int hashlen, BIGNUM *shared_secret, u_char **keyp) { - Kex *kex = ssh->kex; + struct kex *kex = ssh->kex; struct sshbuf *b = NULL; EVP_MD_CTX md; char c = id; @@ -673,7 +673,7 @@ int kex_derive_keys(struct ssh *ssh, u_char *hash, u_int hashlen, BIGNUM *shared_secret) { - Kex *kex = ssh->kex; + struct kex *kex = ssh->kex; u_char *keys[NKEYS]; u_int i, j, mode, ctos; int r; diff --git a/ssh/kex.h b/ssh/kex.h index 2c5ee98..7af36aa 100644 --- a/ssh/kex.h +++ b/ssh/kex.h @@ -79,7 +79,6 @@ enum kex_exchange { #define KEX_INIT_SENT 0x0001 -typedef struct Kex Kex; typedef struct sshmac Mac; typedef struct Comp Comp; typedef struct Enc Enc; @@ -107,7 +106,7 @@ struct Newkeys { struct ssh; -struct Kex { +struct kex { u_char *session_id; size_t session_id_len; Newkeys *newkeys[MODE_MAX]; @@ -138,10 +137,10 @@ struct Kex { int kex_names_valid(const char *); -int kex_new(struct ssh *, char *[PROPOSAL_MAX], Kex **); +int kex_new(struct ssh *, char *[PROPOSAL_MAX], struct kex **); int kex_setup(struct ssh *, char *[PROPOSAL_MAX]); void kex_free_newkeys(Newkeys *); -void kex_free(Kex *); +void kex_free(struct kex *); int kex_buf2prop(struct sshbuf *, int *, char ***); int kex_prop2buf(struct sshbuf *, char *proposal[PROPOSAL_MAX]); diff --git a/ssh/kexdhc.c b/ssh/kexdhc.c index a2ea39e..4056406 100644 --- a/ssh/kexdhc.c +++ b/ssh/kexdhc.c @@ -48,7 +48,7 @@ static int input_kex_dh(int, u_int32_t, struct ssh *); int kexdh_client(struct ssh *ssh) { - Kex *kex = ssh->kex; + struct kex *kex = ssh->kex; int r; /* generate and send 'e', client DH public key */ @@ -89,7 +89,7 @@ kexdh_client(struct ssh *ssh) static int input_kex_dh(int type, u_int32_t seq, struct ssh *ssh) { - Kex *kex = ssh->kex; + struct kex *kex = ssh->kex; BIGNUM *dh_server_pub = NULL, *shared_secret = NULL; struct sshkey *server_host_key = NULL; u_char *kbuf = NULL, *server_host_key_blob = NULL, *signature = NULL; diff --git a/ssh/kexdhs.c b/ssh/kexdhs.c index 7560184..12d77f6 100644 --- a/ssh/kexdhs.c +++ b/ssh/kexdhs.c @@ -51,7 +51,7 @@ static int input_kex_dh_init(int, u_int32_t, struct ssh *); int kexdh_server(struct ssh *ssh) { - Kex *kex = ssh->kex; + struct kex *kex = ssh->kex; int r; /* generate server DH public key */ @@ -83,7 +83,7 @@ kexdh_server(struct ssh *ssh) int input_kex_dh_init(int type, u_int32_t seq, struct ssh *ssh) { - Kex *kex = ssh->kex; + struct kex *kex = ssh->kex; BIGNUM *shared_secret = NULL, *dh_client_pub = NULL; struct sshkey *server_host_public, *server_host_private; u_char *kbuf = NULL, *signature = NULL, *server_host_key_blob = NULL; diff --git a/ssh/kexecdhc.c b/ssh/kexecdhc.c index 4ecc987..a21e7d8 100644 --- a/ssh/kexecdhc.c +++ b/ssh/kexecdhc.c @@ -49,7 +49,7 @@ static int input_kex_ecdh_reply(int, u_int32_t, struct ssh *); int kexecdh_client(struct ssh *ssh) { - Kex *kex = ssh->kex; + struct kex *kex = ssh->kex; EC_KEY *client_key = NULL; const EC_GROUP *group; const EC_POINT *public_key; @@ -96,7 +96,7 @@ kexecdh_client(struct ssh *ssh) static int input_kex_ecdh_reply(int type, u_int32_t seq, struct ssh *ssh) { - Kex *kex = ssh->kex; + struct kex *kex = ssh->kex; const EC_GROUP *group; EC_POINT *server_public = NULL; EC_KEY *client_key; diff --git a/ssh/kexecdhs.c b/ssh/kexecdhs.c index a2c6732..9b1771a 100644 --- a/ssh/kexecdhs.c +++ b/ssh/kexecdhs.c @@ -59,7 +59,7 @@ kexecdh_server(struct ssh *ssh) static int input_kex_ecdh_init(int type, u_int32_t seq, struct ssh *ssh) { - Kex *kex = ssh->kex; + struct kex *kex = ssh->kex; EC_POINT *client_public; EC_KEY *server_key = NULL; const EC_GROUP *group; diff --git a/ssh/kexgexc.c b/ssh/kexgexc.c index b0a3c63..51ec864 100644 --- a/ssh/kexgexc.c +++ b/ssh/kexgexc.c @@ -50,7 +50,7 @@ static int input_kex_dh_gex_reply(int, u_int32_t, struct ssh *); int kexgex_client(struct ssh *ssh) { - Kex *kex = ssh->kex; + struct kex *kex = ssh->kex; int r, nbits; nbits = dh_estimate(kex->we_need * 8); @@ -91,7 +91,7 @@ kexgex_client(struct ssh *ssh) static int input_kex_dh_gex_group(int type, u_int32_t seq, struct ssh *ssh) { - Kex *kex = ssh->kex; + struct kex *kex = ssh->kex; BIGNUM *p = NULL, *g = NULL; int r; @@ -143,7 +143,7 @@ out: static int input_kex_dh_gex_reply(int type, u_int32_t seq, struct ssh *ssh) { - Kex *kex = ssh->kex; + struct kex *kex = ssh->kex; BIGNUM *dh_server_pub = NULL, *shared_secret = NULL; struct sshkey *server_host_key; u_char *kbuf = NULL, *hash, *signature = NULL, *server_host_key_blob = NULL; diff --git a/ssh/kexgexs.c b/ssh/kexgexs.c index 1d130a6..3d38059 100644 --- a/ssh/kexgexs.c +++ b/ssh/kexgexs.c @@ -65,7 +65,7 @@ kexgex_server(struct ssh *ssh) static int input_kex_dh_gex_request(int type, u_int32_t seq, struct ssh *ssh) { - Kex *kex = ssh->kex; + struct kex *kex = ssh->kex; int r, min = -1, max = -1, nbits = -1; switch (type) { @@ -137,7 +137,7 @@ input_kex_dh_gex_request(int type, u_int32_t seq, struct ssh *ssh) static int input_kex_dh_gex_init(int type, u_int32_t seq, struct ssh *ssh) { - Kex *kex = ssh->kex; + struct kex *kex = ssh->kex; BIGNUM *shared_secret = NULL, *dh_client_pub = NULL; struct sshkey *server_host_public, *server_host_private; u_char *kbuf = NULL, *signature = NULL, *server_host_key_blob = NULL; diff --git a/ssh/monitor.c b/ssh/monitor.c index 5bff5a9..2e69dad 100644 --- a/ssh/monitor.c +++ b/ssh/monitor.c @@ -1474,7 +1474,7 @@ void monitor_apply_keystate(struct monitor *pmonitor) { struct ssh *ssh = active_state; /* XXX */ - Kex *kex; + struct kex *kex; int r; debug3("%s: packet_set_state", __func__); diff --git a/ssh/monitor.h b/ssh/monitor.h index 4c451b3..4954e91 100644 --- a/ssh/monitor.h +++ b/ssh/monitor.h @@ -70,7 +70,7 @@ struct monitor { int m_log_sendfd; struct mm_master *m_zback; struct mm_master *m_zlib; - struct Kex **m_pkex; + struct kex **m_pkex; pid_t m_pid; }; diff --git a/ssh/monitor_wrap.c b/ssh/monitor_wrap.c index 6357c0d..6d57a17 100644 --- a/ssh/monitor_wrap.c +++ b/ssh/monitor_wrap.c @@ -216,7 +216,7 @@ int mm_sshkey_sign(struct sshkey *key, u_char **sigp, size_t *lenp, u_char *data, size_t datalen, u_int compat) { - Kex *kex = *pmonitor->m_pkex; + struct kex *kex = *pmonitor->m_pkex; struct sshbuf *m; int r; diff --git a/ssh/packet.c b/ssh/packet.c index fede4a6..37d45c9 100644 --- a/ssh/packet.c +++ b/ssh/packet.c @@ -2173,7 +2173,7 @@ ssh_packet_set_postauth(struct ssh *ssh) /* turn kex into a blob for packet state serialization */ static int -kex_to_blob(struct sshbuf *m, Kex *kex) +kex_to_blob(struct sshbuf *m, struct kex *kex) { int r; @@ -2363,12 +2363,12 @@ newkeys_from_blob(struct sshbuf *m, struct ssh *ssh, int mode) /* restore kex from blob for packet state de-serialization */ static int -kex_from_blob(struct sshbuf *m, Kex **kexp) +kex_from_blob(struct sshbuf *m, struct kex **kexp) { - Kex *kex; + struct kex *kex; int r; - if ((kex = calloc(1, sizeof(Kex))) == NULL || + if ((kex = calloc(1, sizeof(struct kex))) == NULL || (kex->my = sshbuf_new()) == NULL || (kex->peer = sshbuf_new()) == NULL) { r = SSH_ERR_ALLOC_FAIL; diff --git a/ssh/packet.h b/ssh/packet.h index d8d3610..a6cb60b 100644 --- a/ssh/packet.h +++ b/ssh/packet.h @@ -48,7 +48,7 @@ struct ssh { void *app_data; /* Key exchange */ - Kex *kex; + struct kex *kex; Newkeys *current_keys[MODE_MAX]; /* Host key verification */ diff --git a/ssh/ssh_api.c b/ssh/ssh_api.c index 7e11f68..4feb3e9 100644 --- a/ssh/ssh_api.c +++ b/ssh/ssh_api.c @@ -382,7 +382,7 @@ _ssh_send_banner(struct ssh *ssh, char **bannerp) int _ssh_exchange_banner(struct ssh *ssh) { - Kex *kex = ssh->kex; + struct kex *kex = ssh->kex; int r; /* diff --git a/ssh/sshd.c b/ssh/sshd.c index eb0a5eb..b12f3c2 100644 --- a/ssh/sshd.c +++ b/ssh/sshd.c @@ -2213,7 +2213,7 @@ do_ssh1_kex(struct ssh *ssh) static void do_ssh2_kex(struct ssh *ssh) { - Kex *kex; + struct kex *kex; int r; if (options.ciphers != NULL) {