aboutsummaryrefslogtreecommitdiff
path: root/include/libssh
diff options
context:
space:
mode:
authorDirkjan Bussink <d.bussink@gmail.com>2019-02-08 19:37:35 +0000
committerAndreas Schneider <asn@cryptomilk.org>2019-02-22 15:30:59 +0100
commitc6608c921118268e233da03435d1d64f0e7449d7 (patch)
treeecdd0d48a9b5c6d233647f81dd555c7f6f00721e /include/libssh
parentf055319efe682cc3c2e6d2c1cf00b4fcd5c55ef4 (diff)
downloadlibssh-c6608c921118268e233da03435d1d64f0e7449d7.tar.gz
libssh-c6608c921118268e233da03435d1d64f0e7449d7.tar.xz
libssh-c6608c921118268e233da03435d1d64f0e7449d7.zip
Refactor ssh_packet_hmac_verify to allow for direct buffer
This will make it easier to do Encrypt-then-MAC checks as those will be on the direct encrypted data received before decrypting which means they are not allocated in an ssh buffer at that point yet. Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com> Reviewed-by: Jon Simons <jon@jonsimons.org> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Diffstat (limited to 'include/libssh')
-rw-r--r--include/libssh/packet.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/libssh/packet.h b/include/libssh/packet.h
index 2328cc5b..8fc7ce42 100644
--- a/include/libssh/packet.h
+++ b/include/libssh/packet.h
@@ -81,7 +81,7 @@ int ssh_packet_decrypt(ssh_session session, uint8_t *destination, uint8_t *sourc
unsigned char *ssh_packet_encrypt(ssh_session session,
void *packet,
unsigned int len);
-int ssh_packet_hmac_verify(ssh_session session,ssh_buffer buffer,
+int ssh_packet_hmac_verify(ssh_session session, const void *data, size_t len,
unsigned char *mac, enum ssh_hmac_e type);
int ssh_packet_set_newkeys(ssh_session session,
enum ssh_crypto_direction_e direction);