diff options
author | Andreas Schneider <mail@cynapses.org> | 2009-07-25 23:19:41 +0200 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2009-07-25 23:19:41 +0200 |
commit | 28b5d0f8751a8979231b3d2e6ccf182256219d52 (patch) | |
tree | 30618b26293838a766e56664ffcdbc0d583fb63c /libssh/kex.c | |
parent | ba217dec1c7de84b1e51807660ccd2cc86f8dde4 (diff) | |
download | libssh-28b5d0f8751a8979231b3d2e6ccf182256219d52.tar.gz libssh-28b5d0f8751a8979231b3d2e6ccf182256219d52.tar.xz libssh-28b5d0f8751a8979231b3d2e6ccf182256219d52.zip |
Switch completly to stdint types.
Diffstat (limited to 'libssh/kex.c')
-rw-r--r-- | libssh/kex.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libssh/kex.c b/libssh/kex.c index c4ef6801..5927ba99 100644 --- a/libssh/kex.c +++ b/libssh/kex.c @@ -616,12 +616,12 @@ int ssh_get_kex1(SSH_SESSION *session) { ssh_string enc_session = NULL; ssh_public_key srv = NULL; ssh_public_key host = NULL; - u32 server_bits; - u32 host_bits; - u32 protocol_flags; - u32 supported_ciphers_mask; - u32 supported_authentications_mask; - u16 bits; + uint32_t server_bits; + uint32_t host_bits; + uint32_t protocol_flags; + uint32_t supported_ciphers_mask; + uint32_t supported_authentications_mask; + uint16_t bits; int rc = -1; int ko; @@ -661,7 +661,7 @@ int ssh_get_kex1(SSH_SESSION *session) { buffer_get_u32(session->in_buffer, &supported_ciphers_mask); ko = buffer_get_u32(session->in_buffer, &supported_authentications_mask); - if ((ko != sizeof(u32)) || !host_mod || !host_exp + if ((ko != sizeof(uint32_t)) || !host_mod || !host_exp || !server_mod || !server_exp) { ssh_log(session, SSH_LOG_RARE, "Invalid SSH_SMSG_PUBLIC_KEY packet"); ssh_set_error(session, SSH_FATAL, "Invalid SSH_SMSG_PUBLIC_KEY packet"); @@ -738,7 +738,7 @@ int ssh_get_kex1(SSH_SESSION *session) { bits, string_len(enc_session)); bits = htons(bits); /* the encrypted mpint */ - if (buffer_add_data(session->out_buffer, &bits, sizeof(u16)) < 0) { + if (buffer_add_data(session->out_buffer, &bits, sizeof(uint16_t)) < 0) { goto error; } if (buffer_add_data(session->out_buffer, enc_session->string, |