rename kex_finish() to kex_send_newkeys()

This commit is contained in:
Markus Friedl
2012-01-20 00:19:24 +01:00
parent 27e9f28bcd
commit f25d6cdfc8
8 changed files with 10 additions and 12 deletions

View File

@@ -176,7 +176,7 @@ kex_reset_dispatch(struct ssh *ssh)
}
int
kex_finish(struct ssh *ssh)
kex_send_newkeys(struct ssh *ssh)
{
int r;
@@ -200,7 +200,6 @@ kex_input_newkeys(int type, u_int32_t seq, struct ssh *ssh)
ssh_dispatch_set(ssh, SSH2_MSG_NEWKEYS, &kex_protocol_error);
if ((r = sshpkt_get_end(ssh)) != 0)
return r;
kex->done = 1;
sshbuf_reset(kex->peer);
/* sshbuf_reset(kex->my); */
@@ -477,9 +476,8 @@ kex_choose_conf(struct ssh *ssh)
Kex *kex = ssh->kex;
if ((r = kex_buf2prop(kex->my, NULL, &my)) != 0 ||
(r = kex_buf2prop(kex->peer, &first_kex_follows, &peer)) != 0) {
(r = kex_buf2prop(kex->peer, &first_kex_follows, &peer)) != 0)
goto out;
}
if (kex->server) {
cprop=peer;

View File

@@ -135,9 +135,8 @@ 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], Kex **);
int kex_setup(struct ssh *, char *[PROPOSAL_MAX]);
int kex_finish(struct ssh *);
void kex_free(Kex *);
int kex_buf2prop(struct sshbuf *, int *, char ***);
@@ -147,6 +146,7 @@ void kex_prop_free(char **);
int kex_send_kexinit(struct ssh *);
int kex_input_kexinit(int, u_int32_t, struct ssh *);
int kex_derive_keys(struct ssh *, u_char *, u_int, BIGNUM *);
int kex_send_newkeys(struct ssh *);
Newkeys *kex_get_newkeys(struct ssh *, int);

View File

@@ -181,7 +181,7 @@ input_kex_dh(int type, u_int32_t seq, struct ssh *ssh)
}
if ((r = kex_derive_keys(ssh, hash, hashlen, shared_secret)) == 0)
r = kex_finish(ssh);
r = kex_send_newkeys(ssh);
out:
DH_free(kex->dh);
kex->dh = NULL;

View File

@@ -190,7 +190,7 @@ input_kex_dh_init(int type, u_int32_t seq, struct ssh *ssh)
goto out;
if ((r = kex_derive_keys(ssh, hash, hashlen, shared_secret)) == 0)
r = kex_finish(ssh);
r = kex_send_newkeys(ssh);
out:
DH_free(kex->dh);
kex->dh = NULL;

View File

@@ -199,7 +199,7 @@ input_kex_ecdh_reply(int type, u_int32_t seq, struct ssh *ssh)
}
if ((r = kex_derive_keys(ssh, hash, hashlen, shared_secret)) == 0)
r = kex_finish(ssh);
r = kex_send_newkeys(ssh);
out:
if (kex->ec_client_key) {
EC_KEY_free(kex->ec_client_key);

View File

@@ -185,7 +185,7 @@ input_kex_ecdh_init(int type, u_int32_t seq, struct ssh *ssh)
goto out;
if ((r = kex_derive_keys(ssh, hash, hashlen, shared_secret)) == 0)
r = kex_finish(ssh);
r = kex_send_newkeys(ssh);
out:
if (kex->ec_client_key) {
EC_KEY_free(kex->ec_client_key);

View File

@@ -241,7 +241,7 @@ input_kex_dh_gex_reply(int type, u_int32_t seq, struct ssh *ssh)
}
if ((r = kex_derive_keys(ssh, hash, hashlen, shared_secret)) == 0)
r = kex_finish(ssh);
r = kex_send_newkeys(ssh);
out:
DH_free(kex->dh);
kex->dh = NULL;

View File

@@ -248,7 +248,7 @@ input_kex_dh_gex_init(int type, u_int32_t seq, struct ssh *ssh)
goto out;
if ((r = kex_derive_keys(ssh, hash, hashlen, shared_secret)) == 0)
r = kex_finish(ssh);
r = kex_send_newkeys(ssh);
out:
DH_free(kex->dh);
kex->dh = NULL;