diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2010-05-14 00:51:08 +0200 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2010-05-14 00:51:08 +0200 |
commit | b23b3f1d9951df3ea7cc074de40db04bdf0d3a1c (patch) | |
tree | d4fe8f4c4aa71c6cebe7d1d92dc25ea145d98cd1 /libssh/crypt.c | |
parent | 46b249f5ce552bba2e0a170cb0b8052b1419924b (diff) | |
download | libssh-b23b3f1d9951df3ea7cc074de40db04bdf0d3a1c.tar.gz libssh-b23b3f1d9951df3ea7cc074de40db04bdf0d3a1c.tar.xz libssh-b23b3f1d9951df3ea7cc074de40db04bdf0d3a1c.zip |
Sanitize libssh namespace + legacy wrappers
Diffstat (limited to 'libssh/crypt.c')
-rw-r--r-- | libssh/crypt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libssh/crypt.c b/libssh/crypt.c index c42cd35..1085c4a 100644 --- a/libssh/crypt.c +++ b/libssh/crypt.c @@ -40,6 +40,8 @@ #include "libssh/session.h" #include "libssh/wrapper.h" #include "libssh/crypto.h" +#include "libssh/buffer.h" + uint32_t packet_decrypt_len(ssh_session session, char *crypted){ uint32_t decrypted; @@ -196,7 +198,7 @@ int packet_hmac_verify(ssh_session session, ssh_buffer buffer, seq = htonl(session->recv_seq); hmac_update(ctx, (unsigned char *) &seq, sizeof(uint32_t)); - hmac_update(ctx, buffer_get(buffer), buffer_get_len(buffer)); + hmac_update(ctx, ssh_buffer_get_begin(buffer), ssh_buffer_get_len(buffer)); hmac_final(ctx, hmacbuf, &len); #ifdef DEBUG_CRYPTO |