replace Newkeys typedef with 'struct newkeys'

This commit is contained in:
Markus Friedl
2012-10-12 16:32:27 +02:00
parent ad4ef1067c
commit e92ff3d5b1
5 changed files with 13 additions and 14 deletions

View File

@@ -320,7 +320,7 @@ kex_new(struct ssh *ssh, char *proposal[PROPOSAL_MAX], struct kex **kexp)
}
void
kex_free_newkeys(Newkeys *newkeys)
kex_free_newkeys(struct newkeys *newkeys)
{
if (newkeys == NULL)
return;
@@ -518,7 +518,7 @@ proposals_match(char *my[PROPOSAL_MAX], char *peer[PROPOSAL_MAX])
static int
kex_choose_conf(struct ssh *ssh)
{
Newkeys *newkeys;
struct newkeys *newkeys;
char **my = NULL, **peer = NULL;
char **cprop, **sprop;
int nenc, nmac, ncomp;
@@ -699,10 +699,10 @@ kex_derive_keys(struct ssh *ssh, u_char *hash, u_int hashlen,
return 0;
}
Newkeys *
struct newkeys *
kex_get_newkeys(struct ssh *ssh, int mode)
{
Newkeys *ret;
struct newkeys *ret;
ret = ssh->current_keys[mode];
ssh->current_keys[mode] = NULL;

View File

@@ -82,7 +82,6 @@ enum kex_exchange {
typedef struct sshmac Mac;
typedef struct Comp Comp;
typedef struct Enc Enc;
typedef struct Newkeys Newkeys;
struct Enc {
char *name;
@@ -98,7 +97,7 @@ struct Comp {
int enabled;
char *name;
};
struct Newkeys {
struct newkeys {
Enc enc;
Mac mac;
Comp comp;
@@ -109,7 +108,7 @@ struct ssh;
struct kex {
u_char *session_id;
size_t session_id_len;
Newkeys *newkeys[MODE_MAX];
struct newkeys *newkeys[MODE_MAX];
u_int we_need;
int server;
char *name;
@@ -139,7 +138,7 @@ int kex_names_valid(const char *);
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_newkeys(struct newkeys *);
void kex_free(struct kex *);
int kex_buf2prop(struct sshbuf *, int *, char ***);
@@ -151,7 +150,7 @@ 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);
struct newkeys *kex_get_newkeys(struct ssh *, int);
int kexdh_client(struct ssh *);
int kexdh_server(struct ssh *);

View File

@@ -74,7 +74,7 @@ void mm_ssh1_session_id(u_char *);
int mm_ssh1_session_key(BIGNUM *);
/* Key export functions */
struct Newkeys *mm_newkeys_from_blob(u_char *, int);
struct newkeys *mm_newkeys_from_blob(u_char *, int);
int mm_newkeys_to_blob(int, u_char **, u_int *);
void monitor_apply_keystate(struct monitor *);

View File

@@ -166,7 +166,7 @@ struct session_state {
int packet_timeout_ms;
/* Session key information for Encryption and MAC */
Newkeys *newkeys[MODE_MAX];
struct newkeys *newkeys[MODE_MAX];
struct packet_state p_read, p_send;
u_int64_t max_blocks_in, max_blocks_out;
@@ -2200,7 +2200,7 @@ newkeys_to_blob(struct sshbuf *m, struct ssh *ssh, int mode)
Comp *comp;
Enc *enc;
Mac *mac;
Newkeys *newkey;
struct newkeys *newkey;
int r;
if ((newkey = ssh->state->newkeys[mode]) == NULL)
@@ -2307,7 +2307,7 @@ newkeys_from_blob(struct sshbuf *m, struct ssh *ssh, int mode)
Comp *comp;
Enc *enc;
Mac *mac;
Newkeys *newkey = NULL;
struct newkeys *newkey = NULL;
size_t keylen, ivlen, maclen;
int r;

View File

@@ -49,7 +49,7 @@ struct ssh {
/* Key exchange */
struct kex *kex;
Newkeys *current_keys[MODE_MAX];
struct newkeys *current_keys[MODE_MAX];
/* Host key verification */
char *host;