> From: owner-openssl-us...@openssl.org On Behalf Of ikuzar > Sent: Wednesday, 16 March, 2011 11:21 (topposting fixed) > 2011/3/15 Dave Thompson <dthomp...@prinpay.com> > > Option SSL_OP_NO_COMPRESSION is commented as > /* Don't use compression even if supported */ > and is used in what looks like the right places.
> Could you tell me how to use this option ? in which function ? > I found something like below in the internet > ( I did not find on OpenSSL website ) > #ifndef OPENSSL_NO_COMP > if (!(s->options & SSL_OP_NO_COMPRESSION)) > len += SSL3_RT_MAX_COMPRESSED_OVERHEAD; That's in the openssl source, specifically ssl/s3_both.c . There are several other uses in s3_ code and one in s23_clnt.c ; that's what I meant by "looks like the right places". You don't write that. If you have downloaded the source and built it, just look in your source tree. If you haven't you can download the source and just untar it and look at it, without actually building it. But judging from the level of your questions I doubt you're ready to understand it. All SSL_OP_ options are set with SSL_CTX_set_options before creating the SSL object from the CTX object, and/or SSL_set_options afterward. 'man SSL_set_options' if on Unix, although this particular option seems to have been missed in the documentation. > but I do not know how to write in my source code. My source code is very simple : > cli_meth = TLSv1_method(); > cli_ctx = SSL_CTX_new(cli_meth); so either do SSL_CTX_set_options here > SSL *cli_ssl = SSL_new(cli_ctx); > SSL_set_fd(cli_ssl, s_cli) or do SSL_set_options here (after the SSL_new but before the SSL_connect) > SSL_connect(cli_ssl) > etc ... ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org