diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-09-23 21:55:54 +0200 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-09-23 21:55:54 +0200 |
commit | 9a8d4cd0fdd18127065cacbc11296933669ea9ca (patch) | |
tree | cccf507167e28aa5038cea357d1f220668a4e937 /libssh/crypt.c | |
parent | ffed8b03bb6e170abbd9564547ba439302840618 (diff) | |
download | libssh-9a8d4cd0fdd18127065cacbc11296933669ea9ca.tar.gz libssh-9a8d4cd0fdd18127065cacbc11296933669ea9ca.tar.xz libssh-9a8d4cd0fdd18127065cacbc11296933669ea9ca.zip |
get rid of SSH_SESSION
Diffstat (limited to 'libssh/crypt.c')
-rw-r--r-- | libssh/crypt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libssh/crypt.c b/libssh/crypt.c index 1d4af3e..d353772 100644 --- a/libssh/crypt.c +++ b/libssh/crypt.c @@ -38,7 +38,7 @@ #include "libssh/priv.h" #include "libssh/crypto.h" -uint32_t packet_decrypt_len(SSH_SESSION *session, char *crypted){ +uint32_t packet_decrypt_len(ssh_session session, char *crypted){ uint32_t decrypted; if (session->current_crypto) { @@ -56,7 +56,7 @@ uint32_t packet_decrypt_len(SSH_SESSION *session, char *crypted){ return ntohl(decrypted); } -int packet_decrypt(SSH_SESSION *session, void *data,uint32_t len) { +int packet_decrypt(ssh_session session, void *data,uint32_t len) { struct crypto_struct *crypto = session->current_crypto->in_cipher; char *out = NULL; if(len % session->current_crypto->in_cipher->blocksize != 0){ @@ -92,7 +92,7 @@ int packet_decrypt(SSH_SESSION *session, void *data,uint32_t len) { return 0; } -unsigned char *packet_encrypt(SSH_SESSION *session, void *data, uint32_t len) { +unsigned char *packet_encrypt(ssh_session session, void *data, uint32_t len) { struct crypto_struct *crypto = NULL; HMACCTX ctx = NULL; char *out = NULL; @@ -179,7 +179,7 @@ unsigned char *packet_encrypt(SSH_SESSION *session, void *data, uint32_t len) { * @return 0 if hmac and mac are equal, < 0 if not or an error * occured. */ -int packet_hmac_verify(SSH_SESSION *session, ssh_buffer buffer, +int packet_hmac_verify(ssh_session session, ssh_buffer buffer, unsigned char *mac) { unsigned char hmacbuf[EVP_MAX_MD_SIZE] = {0}; HMACCTX ctx; |