Mercurial > dropbear
comparison 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 |
comparison
equal
deleted
inserted
replaced
554:1d5a3df28b53 | 555:daf52f813328 |
---|---|
369 || ses.newkeys->trans.algo_comp == DROPBEAR_COMP_ZLIB_DELAY) { | 369 || ses.newkeys->trans.algo_comp == DROPBEAR_COMP_ZLIB_DELAY) { |
370 ses.newkeys->trans.zstream = (z_streamp)m_malloc(sizeof(z_stream)); | 370 ses.newkeys->trans.zstream = (z_streamp)m_malloc(sizeof(z_stream)); |
371 ses.newkeys->trans.zstream->zalloc = Z_NULL; | 371 ses.newkeys->trans.zstream->zalloc = Z_NULL; |
372 ses.newkeys->trans.zstream->zfree = Z_NULL; | 372 ses.newkeys->trans.zstream->zfree = Z_NULL; |
373 | 373 |
374 if (deflateInit(ses.newkeys->trans.zstream, Z_DEFAULT_COMPRESSION) | 374 if (deflateInit2(ses.newkeys->trans.zstream, Z_DEFAULT_COMPRESSION, |
375 Z_DEFLATED, DROPBEAR_ZLIB_WINDOW_BITS, | |
376 DROPBEAR_ZLIB_MEM_LEVEL, Z_DEFAULT_STRATEGY) | |
375 != Z_OK) { | 377 != Z_OK) { |
376 dropbear_exit("zlib error"); | 378 dropbear_exit("zlib error"); |
377 } | 379 } |
378 } else { | 380 } else { |
379 ses.newkeys->trans.zstream = NULL; | 381 ses.newkeys->trans.zstream = NULL; |