summaryrefslogtreecommitdiffstats
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>2015-10-12 13:56:21 +0200
commitd1de73c7aaa65b2a137ada57b479d5a42e4c212f (patch)
treee1796b2137d3c6553dfbb4bf6af9aef7889f2d9d /src/pki_crypto.c
parentc12915e5037fe37fabf17126e57f08e5c4a49971 (diff)
downloadlibssh-d1de73c7aaa65b2a137ada57b479d5a42e4c212f.tar.gz
libssh-d1de73c7aaa65b2a137ada57b479d5a42e4c212f.tar.xz
libssh-d1de73c7aaa65b2a137ada57b479d5a42e4c212f.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>
Diffstat (limited to 'src/pki_crypto.c')
-rw-r--r--src/pki_crypto.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pki_crypto.c b/src/pki_crypto.c
index 9df6898a..e84f3e84 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;
}
@@ -1449,7 +1449,7 @@ ssh_signature pki_signature_from_blob(const ssh_key pubkey,
}
s = buffer_get_ssh_string(b);
- rlen = ssh_buffer_get_rest_len(b);
+ rlen = ssh_buffer_get_len(b);
ssh_buffer_free(b);
if (s == NULL) {
ssh_signature_free(sig);