diff options
author | Fabiano Fidêncio <fidencio@redhat.com> | 2015-09-17 14:11:08 +0200 |
---|---|---|
committer | Fabiano Fidêncio <fidencio@redhat.com> | 2015-10-12 13:56:21 +0200 |
commit | 8f8dab8d214eea91999cea8153408d8c2d855d12 (patch) | |
tree | 87ba7aafbc4f1f20161d1c3e349d0461a17aa50f /src/packet_crypt.c | |
parent | 62fe4e426f08e0ba4c40c6b379e792883a4e6ae3 (diff) | |
download | libssh-8f8dab8d214eea91999cea8153408d8c2d855d12.tar.gz libssh-8f8dab8d214eea91999cea8153408d8c2d855d12.tar.xz libssh-8f8dab8d214eea91999cea8153408d8c2d855d12.zip |
cleanup: use ssh_ prefix in the packet (non-static) functions
Having "ssh_" prefix in the functions' name will avoid possible clashes
when compiling libssh statically.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Diffstat (limited to 'src/packet_crypt.c')
-rw-r--r-- | src/packet_crypt.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/packet_crypt.c b/src/packet_crypt.c index ecec2f69..57e3a444 100644 --- a/src/packet_crypt.c +++ b/src/packet_crypt.c @@ -44,11 +44,11 @@ #include "libssh/crypto.h" #include "libssh/buffer.h" -uint32_t packet_decrypt_len(ssh_session session, char *crypted){ +uint32_t ssh_packet_decrypt_len(ssh_session session, char *crypted){ uint32_t decrypted; if (session->current_crypto) { - if (packet_decrypt(session, crypted, + if (ssh_packet_decrypt(session, crypted, session->current_crypto->in_cipher->blocksize) < 0) { return 0; } @@ -57,7 +57,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 ssh_packet_decrypt(ssh_session session, void *data,uint32_t len) { struct ssh_cipher_struct *crypto = session->current_crypto->in_cipher; char *out = NULL; @@ -80,7 +80,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 *ssh_packet_encrypt(ssh_session session, void *data, uint32_t len) { struct ssh_cipher_struct *crypto = NULL; HMACCTX ctx = NULL; char *out = NULL; @@ -149,7 +149,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 * occurred. */ -int packet_hmac_verify(ssh_session session, ssh_buffer buffer, +int ssh_packet_hmac_verify(ssh_session session, ssh_buffer buffer, unsigned char *mac, enum ssh_hmac_e type) { unsigned char hmacbuf[DIGEST_MAX_LEN] = {0}; HMACCTX ctx; |