[EMAIL PROTECTED] writes:
>In message
><[EMAIL PROTECTED]> on Wed,
>15 Jan 2003 10:20:46 +0000, Andrew Marlow <[EMAIL PROTECTED]> said:
>
>apm35> I would like to report a bug in openSSL version 0.9.7.
>apm35> I cannot get on-the-fly compression to work using
>apm35> SSL_COMP_add_compression_method. 
[snip]
>Actually, the way it's done in 0.9.7, there should be no need to call
>SSL_COMP_add_compression_method() at all (i.e. there should be no need
>at all for the -zlib flag in ssltest).

Maybe, but SSL_COMP_add_compression_method is used by ssltest and if
I go and do likewise then I should get the same result and the result
should be that on-the-fly compression is performed.

>
>However, for this to work, you MUST configure with the options 'zlib'
>or 'zlib-dynamic'.  Something like this:
>
>  ./config zlib

Indeed. If I don't then the macro ZLIB is not defined and
compilation chaos ensues. I *have* configured the build this
and for good measure I have hacked c_zlib.c to force on
the macros ZLIB and DEBUG_ZLIB. I have also added
additional trace statements. Use of ZLIB is definately on.
However, the compress/uncompress functions do not get called.
The variable 'j', used to denote whether the SSL message
has been compressed, is always set to zero. If you force it on
then the ZLIB trace is executed but this is an extreme hack.
The question is "why does ssl_lib decide that compression
is not required?".

>If you want to trace the actual calls, you should do it in
>crypto/comp/c_zlib.c.

Done that.

>
>I'm pondering making 'zlib-dynamic' the default instead of 'no-zlib'.
>Does that sound like a good idea.  

It does to me for a couple of reasons:

1) you can always turn it off, if you don't want it.
   Given how common zlib and dynamic libraries are
   these days it seems like a reasonable default to me.

2) Just because compression support is there doesn't
   mean you *have* to use it.

What it means is that the build
>environment must have zlib.h reachable by the compiler.  We *could*
>have a copy of the relevant lines from zlib.h as part of OpenSSL...

No. Sod's Law says the same information held in 2 different places
*will* be different. If we include the real zlib.h then we would
have to do what most automake/autoconf configuration procedures do,
and that is to check that zlib is available and fail to produce
Makefiles if it is missing (unless --zlib=no has been specified).

Regards,

Andrew Marlow.


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to