Hi Ignacio ,
 
I think that the problem is that your are not linking the appropriate libraries.
Try the following steps
 # ./config zlib
 #  gmake
 #  gcc test.c -L<OpenSSL Source Directory> -I<OpenSSL Source Directory/include> -lssl -lcrypto -lz -ldl
 #./a.out
 compression name: zlib compression

Your Method
#gcc test.c -lssl -lcrypto
//this will use the crypto and ssl libraries that comes OS which is present in the /usr/lib directory and this may not be built with zlib support
# ./a.out
compression name: (null)

Thanks,
Prakash

Ignacio Butler <[EMAIL PROTECTED]> wrote:
hi,

well, i'm using Linux, with a 2.4.xx kernel and the 0.9.8 version of
the ssl library,

to compile it i do: gcc -o master master.c -lssl -lcrypto -lpthread
(same as you do it)

i've compiled the library configurating using "./config zlib" the
library is compiled with this parameter...

thanks prakash,
ignacio

On 8/16/05, prakash babu <[EMAIL PROTECTED]>wrote:
> Hello Ignacio,
>
> I tried the program you attached and it seems to work
> fine .
>
> #include
> #include
> int main()
> {
> COMP_METHOD *comp_method;
> comp_method = COMP_zlib();
> if(comp_method != NULL)
> {
> printf("compression name: %s\n", (comp_method->name !=
> NULL? comp_method->name:""));
> if (comp_method->type ! = NID_undef)
> SSL_COMP_add_compression_method(1,
> comp_method);
> else
> printf("Compression not suported");
> exit(1);
> }
> }
>
> # cc test2.c -lcrypto -lssl
> # ./a.out
> compression name: zlib compression
>
> Can you give me more details such as the platform, compilation steps etc ?
>
> Thanks,
> Prakash
>
>
> Ignacio Butler <[EMAIL PROTECTED]>wrote:
> Hello,
>
> first of all, sorry by my english...
>
> The problem is,
> i have started to develop a simple application that uses SSL with
> compression, but when i try to add the zlib compression method to my
> server it is imposible
>
> the code that i use is:
>
> comp_method = COMP_zlib();
>
> if(comp_method != NULL)
> {
> printf("compression name: %s\n", (comp_method->name !=
> NULL? comp_method->name:""));
> if (comp_method->type != NID_undef)
> SSL_COMP_add_compression_method(COMP_ZLIB, comp_method);
> else
> warning2("Compression not suported");
>
> exit(1);
> }
>
> obiuosly, the output is "Compression not suported"...
>
> i recompiled my openSSL library with zlib support and nothing...
> my openssl version is 0.9.8
>
> thank all!
> ignacio
> --
> -o)
> / \\
> _\_V
> cuando no tenes paredes, no necesitas ventanas
> ______________________________________________________________________
> OpenSSL Project http://www.openssl.org
> User Support Mailing List openssl-users@openssl.org
> Automated List Manager [EMAIL PROTECTED]
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> ; http://mail.yahoo.com


--
-o)
/ \\
_\_V
cuando no tenes paredes, no necesitas ventanas
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager [EMAIL PROTECTED]


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Reply via email to