diff options
author | Fabiano FidĂȘncio <fidencio@redhat.com> | 2015-09-17 09:43:33 +0200 |
---|---|---|
committer | Fabiano FidĂȘncio <fidencio@redhat.com> | 2016-01-19 11:31:07 +0100 |
commit | adc8c20ac17b39e32e6ac9e8913ebeeb1c5b8081 (patch) | |
tree | 1bcd7318e12a316d4908b7eee4914bad7e2db80b /src/kex1.c | |
parent | 63e52afd5b9a378918ea3591e2da8fe78c201407 (diff) | |
download | libssh-adc8c20ac17b39e32e6ac9e8913ebeeb1c5b8081.tar.gz libssh-adc8c20ac17b39e32e6ac9e8913ebeeb1c5b8081.tar.xz libssh-adc8c20ac17b39e32e6ac9e8913ebeeb1c5b8081.zip |
cleanup: use ssh_ prefix in the buffer (non-static) functions
Having "ssh_" prefix in the functions' name will avoid possible clashes
when compiling libssh statically.
Signed-off-by: Fabiano FidĂȘncio <fidencio@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src/kex1.c')
-rw-r--r-- | src/kex1.c | 32 |
1 files changed, 16 insertions, 16 deletions
@@ -51,13 +51,13 @@ static ssh_string make_rsa1_string(ssh_string e, ssh_string n){ goto error; } - if (buffer_add_ssh_string(buffer, rsa) < 0) { + if (ssh_buffer_add_ssh_string(buffer, rsa) < 0) { goto error; } - if (buffer_add_ssh_string(buffer, e) < 0) { + if (ssh_buffer_add_ssh_string(buffer, e) < 0) { goto error; } - if (buffer_add_ssh_string(buffer, n) < 0) { + if (ssh_buffer_add_ssh_string(buffer, n) < 0) { goto error; } @@ -325,32 +325,32 @@ SSH_PACKET_CALLBACK(ssh_packet_publickey1){ ssh_set_error(session,SSH_FATAL,"SSH_KEXINIT received in wrong state"); goto error; } - if (buffer_get_data(packet, session->next_crypto->server_kex.cookie, 8) != 8) { + if (ssh_buffer_get_data(packet, session->next_crypto->server_kex.cookie, 8) != 8) { ssh_set_error(session, SSH_FATAL, "Can't get cookie in buffer"); goto error; } - buffer_get_u32(packet, &server_bits); - server_exp = buffer_get_mpint(packet); + ssh_buffer_get_u32(packet, &server_bits); + server_exp = ssh_buffer_get_mpint(packet); if (server_exp == NULL) { goto error; } - server_mod = buffer_get_mpint(packet); + server_mod = ssh_buffer_get_mpint(packet); if (server_mod == NULL) { goto error; } - buffer_get_u32(packet, &host_bits); - host_exp = buffer_get_mpint(packet); + ssh_buffer_get_u32(packet, &host_bits); + host_exp = ssh_buffer_get_mpint(packet); if (host_exp == NULL) { goto error; } - host_mod = buffer_get_mpint(packet); + host_mod = ssh_buffer_get_mpint(packet); if (host_mod == NULL) { goto error; } - buffer_get_u32(packet, &protocol_flags); - buffer_get_u32(packet, &supported_ciphers_mask); - ko = buffer_get_u32(packet, &supported_authentications_mask); + ssh_buffer_get_u32(packet, &protocol_flags); + ssh_buffer_get_u32(packet, &supported_ciphers_mask); + ko = ssh_buffer_get_u32(packet, &supported_authentications_mask); if ((ko != sizeof(uint32_t)) || !host_mod || !host_exp || !server_mod || !server_exp) { @@ -411,10 +411,10 @@ SSH_PACKET_CALLBACK(ssh_packet_publickey1){ } SSH_LOG(SSH_LOG_PROTOCOL, "Sending SSH_CMSG_SESSION_KEY"); - if (buffer_add_u8(session->out_buffer, SSH_CMSG_SESSION_KEY) < 0) { + if (ssh_buffer_add_u8(session->out_buffer, SSH_CMSG_SESSION_KEY) < 0) { goto error; } - if (buffer_add_u8(session->out_buffer, support_3DES ? SSH_CIPHER_3DES : SSH_CIPHER_DES) < 0) { + if (ssh_buffer_add_u8(session->out_buffer, support_3DES ? SSH_CIPHER_3DES : SSH_CIPHER_DES) < 0) { goto error; } if (ssh_buffer_add_data(session->out_buffer, session->next_crypto->server_kex.cookie, 8) < 0) { @@ -439,7 +439,7 @@ SSH_PACKET_CALLBACK(ssh_packet_publickey1){ goto error; } /* the protocol flags */ - if (buffer_add_u32(session->out_buffer, 0) < 0) { + if (ssh_buffer_add_u32(session->out_buffer, 0) < 0) { goto error; } session->session_state=SSH_SESSION_STATE_KEXINIT_RECEIVED; |