aboutsummaryrefslogtreecommitdiff
path: root/src/pki_crypto.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/pki_crypto.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/pki_crypto.c')
-rw-r--r--src/pki_crypto.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pki_crypto.c b/src/pki_crypto.c
index 0984f8f0..54ad4c8d 100644
--- a/src/pki_crypto.c
+++ b/src/pki_crypto.c
@@ -1034,12 +1034,12 @@ ssh_string pki_publickey_to_blob(const ssh_key key)
goto fail;
}
- str = ssh_string_new(ssh_buffer_get_rest_len(buffer));
+ str = ssh_string_new(ssh_buffer_get_len(buffer));
if (str == NULL) {
goto fail;
}
- rc = ssh_string_fill(str, ssh_buffer_get(buffer), ssh_buffer_get_rest_len(buffer));
+ rc = ssh_string_fill(str, ssh_buffer_get(buffer), ssh_buffer_get_len(buffer));
if (rc < 0) {
goto fail;
}
@@ -1238,13 +1238,13 @@ ssh_string pki_signature_to_blob(const ssh_signature sig)
return NULL;
}
- sig_blob = ssh_string_new(ssh_buffer_get_rest_len(b));
+ sig_blob = ssh_string_new(ssh_buffer_get_len(b));
if (sig_blob == NULL) {
ssh_buffer_free(b);
return NULL;
}
- ssh_string_fill(sig_blob, ssh_buffer_get(b), ssh_buffer_get_rest_len(b));
+ ssh_string_fill(sig_blob, ssh_buffer_get(b), ssh_buffer_get_len(b));
ssh_buffer_free(b);
break;
}