aboutsummaryrefslogtreecommitdiff
path: root/src/known_hosts.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2011-09-08 15:15:41 +0200
committerAndreas Schneider <asn@cryptomilk.org>2011-09-08 15:50:39 +0200
commit5581323c2c81bee79e34b7cfeac625c8eca344ce (patch)
treed901106adc3dae29bd39e9d707ad2a673a385a6e /src/known_hosts.c
parent55c758d0798f89e5f904cc09c272148415c235b7 (diff)
downloadlibssh-5581323c2c81bee79e34b7cfeac625c8eca344ce.tar.gz
libssh-5581323c2c81bee79e34b7cfeac625c8eca344ce.tar.xz
libssh-5581323c2c81bee79e34b7cfeac625c8eca344ce.zip
string: Use the struct and array for allocating the struct.
Diffstat (limited to 'src/known_hosts.c')
-rw-r--r--src/known_hosts.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/known_hosts.c b/src/known_hosts.c
index 7c07d43d..3e5b2793 100644
--- a/src/known_hosts.c
+++ b/src/known_hosts.c
@@ -241,9 +241,9 @@ static int check_public_key(ssh_session session, char **tokens) {
/* TODO: fix the hardcoding */
tmpstring->size = htonl(len);
#ifdef HAVE_LIBGCRYPT
- bignum_bn2bin(tmpbn, len, tmpstring->string);
+ bignum_bn2bin(tmpbn, len, string_data(tmpstring));
#elif defined HAVE_LIBCRYPTO
- bignum_bn2bin(tmpbn, tmpstring->string);
+ bignum_bn2bin(tmpbn, string_data(tmpstring));
#endif
bignum_free(tmpbn);
if (buffer_add_ssh_string(pubkey_buffer, tmpstring) < 0) {
@@ -272,7 +272,7 @@ static int check_public_key(ssh_session session, char **tokens) {
}
/* now test that they are identical */
- if (memcmp(buffer_get_rest(pubkey_buffer), pubkey->string,
+ if (memcmp(buffer_get_rest(pubkey_buffer), ssh_string_data(pubkey),
buffer_get_rest_len(pubkey_buffer)) != 0) {
ssh_buffer_free(pubkey_buffer);
return 0;