diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/kex.c | 2 | ||||
-rw-r--r-- | src/misc.c | 8 | ||||
-rw-r--r-- | src/packet.c | 8 | ||||
-rw-r--r-- | src/packet1.c | 4 | ||||
-rw-r--r-- | src/wrapper.c | 6 |
5 files changed, 14 insertions, 14 deletions
@@ -58,7 +58,7 @@ #define DES "3des-cbc" #endif -#ifdef WITH_LIBZ +#ifdef WITH_ZLIB #define ZLIB "none,zlib,zlib@openssh.com" #else #define ZLIB "none" @@ -80,10 +80,10 @@ #define CRYPTO_STRING "" #endif -#ifdef WITH_LIBZ -#define LIBZ_STRING "/zlib" +#ifdef WITH_ZLIB +#define ZLIB_STRING "/zlib" #else -#define LIBZ_STRING "" +#define ZLIB_STRING "" #endif /** @@ -357,7 +357,7 @@ char *ssh_hostport(const char *host, int port){ const char *ssh_version(int req_version) { if (req_version <= LIBSSH_VERSION_INT) { return SSH_STRINGIFY(LIBSSH_VERSION) GCRYPT_STRING CRYPTO_STRING - LIBZ_STRING; + ZLIB_STRING; } return NULL; diff --git a/src/packet.c b/src/packet.c index 33b284a..fe79874 100644 --- a/src/packet.c +++ b/src/packet.c @@ -255,7 +255,7 @@ int ssh_packet_socket_callback(const void *data, size_t receivedlen, void *user) ssh_log(session, SSH_LOG_PACKET, "After padding, %d bytes left in buffer", buffer_get_rest_len(session->in_buffer)); -#ifdef WITH_LIBZ +#ifdef WITH_ZLIB if (session->current_crypto && session->current_crypto->do_compress_in && buffer_get_rest_len(session->in_buffer)) { @@ -264,7 +264,7 @@ int ssh_packet_socket_callback(const void *data, size_t receivedlen, void *user) goto error; } } -#endif +#endif /* WITH_ZLIB */ session->recv_seq++; /* We don't want to rewrite a new packet while still executing the packet callbacks */ session->packet_state = PACKET_STATE_PROCESSING; @@ -460,7 +460,7 @@ static int packet_send2(ssh_session session) { ssh_log(session, SSH_LOG_PACKET, "Writing on the wire a packet having %u bytes before", currentlen); -#ifdef WITH_LIBZ +#ifdef WITH_ZLIB if (session->current_crypto && session->current_crypto->do_compress_out && buffer_get_rest_len(session->out_buffer)) { @@ -470,7 +470,7 @@ static int packet_send2(ssh_session session) { } currentlen = buffer_get_rest_len(session->out_buffer); } -#endif +#endif /* WITH_ZLIB */ padding = (blocksize - ((currentlen +5) % blocksize)); if(padding < 4) { padding += blocksize; diff --git a/src/packet1.c b/src/packet1.c index a0a36f8..894aedd 100644 --- a/src/packet1.c +++ b/src/packet1.c @@ -214,7 +214,7 @@ int ssh_packet_socket_callback1(const void *data, size_t receivedlen, void *user ssh_log(session, SSH_LOG_PACKET, "The packet is valid"); /* TODO FIXME -#if defined(HAVE_LIBZ) && defined(WITH_LIBZ) +#ifdef WITH_ZLIB if(session->current_crypto && session->current_crypto->do_compress_in){ decompress_buffer(session,session->in_buffer); } @@ -264,7 +264,7 @@ int packet_send1(ssh_session session) { ssh_log(session,SSH_LOG_PACKET,"Sending a %d bytes long packet",currentlen); /* TODO FIXME -#if defined(HAVE_LIBZ) && defined(WITH_LIBZ) +#ifdef WITH_ZLIB if (session->current_crypto && session->current_crypto->do_compress_out) { if (compress_buffer(session, session->out_buffer) < 0) { goto error; diff --git a/src/wrapper.c b/src/wrapper.c index 3a91720..edce03d 100644 --- a/src/wrapper.c +++ b/src/wrapper.c @@ -38,7 +38,7 @@ #include <stdio.h> #include <string.h> -#ifdef WITH_LIBZ +#ifdef WITH_ZLIB #include <zlib.h> #endif @@ -122,7 +122,7 @@ void crypto_free(struct ssh_crypto_struct *crypto){ SAFE_FREE(crypto->session_id); } -#ifdef WITH_LIBZ +#ifdef WITH_ZLIB if (crypto->compress_out_ctx && (deflateEnd(crypto->compress_out_ctx) != 0)) { inflateEnd(crypto->compress_out_ctx); @@ -131,7 +131,7 @@ void crypto_free(struct ssh_crypto_struct *crypto){ (deflateEnd(crypto->compress_in_ctx) != 0)) { inflateEnd(crypto->compress_in_ctx); } -#endif +#endif /* WITH_ZLIB */ if(crypto->encryptIV) SAFE_FREE(crypto->encryptIV); if(crypto->decryptIV) |