summaryrefslogtreecommitdiffstats
path: root/src/known_hosts.c
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2010-10-03 12:07:00 +0200
committerAris Adamantiadis <aris@0xbadc0de.be>2010-10-03 12:07:00 +0200
commit338a3d9b0509d4cf49d2fdb00b17a9e9f7593447 (patch)
tree2a558ca6de423773cde030b44953d5c75a51974c /src/known_hosts.c
parent5687d6e79a3ded310c847177d3a200384fdeb3d9 (diff)
downloadlibssh-338a3d9b0509d4cf49d2fdb00b17a9e9f7593447.tar.gz
libssh-338a3d9b0509d4cf49d2fdb00b17a9e9f7593447.tar.xz
libssh-338a3d9b0509d4cf49d2fdb00b17a9e9f7593447.zip
Removed references to ssh_buffer_get_begin
Diffstat (limited to 'src/known_hosts.c')
-rw-r--r--src/known_hosts.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/known_hosts.c b/src/known_hosts.c
index aeb3f36..60241b7 100644
--- a/src/known_hosts.c
+++ b/src/known_hosts.c
@@ -266,14 +266,14 @@ static int check_public_key(ssh_session session, char **tokens) {
return -1;
}
- if (ssh_buffer_get_len(pubkey_buffer) != ssh_string_len(pubkey)) {
+ if (buffer_get_rest_len(pubkey_buffer) != ssh_string_len(pubkey)) {
ssh_buffer_free(pubkey_buffer);
return 0;
}
/* now test that they are identical */
- if (memcmp(ssh_buffer_get_begin(pubkey_buffer), pubkey->string,
- ssh_buffer_get_len(pubkey_buffer)) != 0) {
+ if (memcmp(buffer_get_rest(pubkey_buffer), pubkey->string,
+ buffer_get_rest_len(pubkey_buffer)) != 0) {
ssh_buffer_free(pubkey_buffer);
return 0;
}
@@ -346,7 +346,7 @@ static int match_hashed_host(ssh_session session, const char *host,
return 0;
}
- mac = hmac_init(ssh_buffer_get_begin(salt), ssh_buffer_get_len(salt), HMAC_SHA1);
+ mac = hmac_init(buffer_get_rest(salt), buffer_get_rest_len(salt), HMAC_SHA1);
if (mac == NULL) {
ssh_buffer_free(salt);
ssh_buffer_free(hash);
@@ -357,8 +357,8 @@ static int match_hashed_host(ssh_session session, const char *host,
hmac_update(mac, host, strlen(host));
hmac_final(mac, buffer, &size);
- if (size == ssh_buffer_get_len(hash) &&
- memcmp(buffer, ssh_buffer_get_begin(hash), size) == 0) {
+ if (size == buffer_get_rest_len(hash) &&
+ memcmp(buffer, buffer_get_rest(hash), size) == 0) {
match = 1;
} else {
match = 0;