On Mon, Sep 09, 2002 at 10:43:51AM -0500, Kenneth R. Robinette wrote: > If one calls COMP_METHOD *comp = COMP_zlib(), the first time this > call is made, a valid COMP_METHOD is returned, and the comp->type is > set correctly. However, if you make the call a second time, a valid > COMP_METHOD is returned, however the comp->type is set to 0.
That does not make sense to me. COMP_zlib in any case of success returns a pointer to the zlib_method structure, which is a static entry in crypto/comp/c_zlib.c. There the "type" member is set to NID_zlib_compression. Thus the only reason why type is "0" would be that "zlib_method" would be overwritten (destroyed). However: If COMP_zlib() fails, a pointer to the zlib_method_nozlib structure is returned. This is also a valid pointer (not a NULL pointer), but it does not provide any compression at all. Its type is "NID_undef", which in turn is 0. >From the code, it seems, that this would be the result with ZLIB_SHARED and COMP_zlib() being called more than once. zlib_loaded is true (succussfully loaded the first time) and then meth is not set to zlib_method again... I am not sure about the intended behaviour, but it probably is not intended this way (read this: it seems to be a bug to me :-). I have therefore bounced this issued into the request tracker. Best regards, Lutz -- Lutz Jaenicke [EMAIL PROTECTED] http://www.aet.TU-Cottbus.DE/personen/jaenicke/ BTU Cottbus, Allgemeine Elektrotechnik Universitaetsplatz 3-4, D-03044 Cottbus ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]