diff common-kex.c @ 555:daf52f813328

- Add option to change zlib windowBits/memLevel
author Matt Johnston <matt@ucc.asn.au>
date Sun, 26 Jul 2009 15:39:47 +0000
parents 0431915df79f
children f9b5dc0cba61
line wrap: on
line diff
--- a/common-kex.c	Fri Jul 24 13:49:07 2009 +0000
+++ b/common-kex.c	Sun Jul 26 15:39:47 2009 +0000
@@ -371,7 +371,9 @@
 		ses.newkeys->trans.zstream->zalloc = Z_NULL;
 		ses.newkeys->trans.zstream->zfree = Z_NULL;
 	
-		if (deflateInit(ses.newkeys->trans.zstream, Z_DEFAULT_COMPRESSION) 
+		if (deflateInit2(ses.newkeys->trans.zstream, Z_DEFAULT_COMPRESSION,
+					Z_DEFLATED, DROPBEAR_ZLIB_WINDOW_BITS, 
+					DROPBEAR_ZLIB_MEM_LEVEL, Z_DEFAULT_STRATEGY)
 				!= Z_OK) {
 			dropbear_exit("zlib error");
 		}