diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2011-09-08 15:15:41 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2011-09-08 15:50:39 +0200 |
commit | 5581323c2c81bee79e34b7cfeac625c8eca344ce (patch) | |
tree | d901106adc3dae29bd39e9d707ad2a673a385a6e /src/known_hosts.c | |
parent | 55c758d0798f89e5f904cc09c272148415c235b7 (diff) | |
download | libssh-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.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/known_hosts.c b/src/known_hosts.c index 7c07d43..3e5b279 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; |