aboutsummaryrefslogtreecommitdiff
path: root/libssh/crypt.c
diff options
context:
space:
mode:
Diffstat (limited to 'libssh/crypt.c')
-rw-r--r--libssh/crypt.c4
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