aboutsummaryrefslogtreecommitdiff
path: root/src/dh.c
diff options
context:
space:
mode:
authorFabiano FidĂȘncio <fidencio@redhat.com>2015-09-25 00:34:42 +0200
committerFabiano FidĂȘncio <fidencio@redhat.com>2016-01-19 11:31:08 +0100
commit05fd0acf457f6514f4dff4d6d2d3906776a76437 (patch)
treebf60c88a30f7a7feb2026d6034f7697682c77d94 /src/dh.c
parent25707e97520c7787f0a742dea419afca4c8cad41 (diff)
downloadlibssh-05fd0acf457f6514f4dff4d6d2d3906776a76437.tar.gz
libssh-05fd0acf457f6514f4dff4d6d2d3906776a76437.tar.xz
libssh-05fd0acf457f6514f4dff4d6d2d3906776a76437.zip
buffer: do not use ssh_buffer_get_rest_len()
As ssh_buffer_get_len() actually calls ssh_buffer_get_rest_len(), let's just use the first one. This is a preparatory step for removing ssh_buffer_get_rest_len(). Signed-off-by: Fabiano FidĂȘncio <fidencio@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src/dh.c')
-rw-r--r--src/dh.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/dh.c b/src/dh.c
index d47c3dc1..67d1f4cf 100644
--- a/src/dh.c
+++ b/src/dh.c
@@ -573,11 +573,11 @@ int ssh_make_sessionid(ssh_session session) {
rc = ssh_buffer_pack(buf,
"dPdPS",
- ssh_buffer_get_rest_len(client_hash),
- ssh_buffer_get_rest_len(client_hash),
+ ssh_buffer_get_len(client_hash),
+ ssh_buffer_get_len(client_hash),
ssh_buffer_get(client_hash),
- ssh_buffer_get_rest_len(server_hash),
- ssh_buffer_get_rest_len(server_hash),
+ ssh_buffer_get_len(server_hash),
+ ssh_buffer_get_len(server_hash),
ssh_buffer_get(server_hash),
session->next_crypto->server_pubkey);
@@ -643,7 +643,7 @@ int ssh_make_sessionid(ssh_session session) {
ssh_set_error_oom(session);
goto error;
}
- sha1(ssh_buffer_get(buf), ssh_buffer_get_rest_len(buf),
+ sha1(ssh_buffer_get(buf), ssh_buffer_get_len(buf),
session->next_crypto->secret_hash);
break;
case SSH_KEX_ECDH_SHA2_NISTP256:
@@ -655,7 +655,7 @@ int ssh_make_sessionid(ssh_session session) {
ssh_set_error_oom(session);
goto error;
}
- sha256(ssh_buffer_get(buf), ssh_buffer_get_rest_len(buf),
+ sha256(ssh_buffer_get(buf), ssh_buffer_get_len(buf),
session->next_crypto->secret_hash);
break;
}