This post is about my attempts to discover why
the ssltest program does not use compression when -zlib
is given on the command line. My openSSL is version 0.9.7
and was built via the command './Configure shared zlib'.
I have proved that compression does not occur.
I proved it via trace statements in z_clib.c.
The trace is never executed. The performance is
the same whether or not -zlib is given on the
command line.
I have received a disappointing response to this query so far.
I am grateful that people have responded but the responses
have been along the lines of 'use 0.9.7' and 'make sure
you say 'Configure shared zlib'. Well I am and I have
but it doesn't work. What follows below is my attempt
to analyse the code. Hopefully this will shed light as
to what is wrong.
Compression happens if s3->tmp.new_compression
points to a compression method structure.
It never does. There are FOUR files that use
this variable; s3_clnt, s3_srvr, s3_enc and t1_enc.
We will deal with each in turn:
s3_clnt
=======
in ssl3_connect for the states SSL3_ST_CW_CHANGE_{A,B}
when there is a change of cipher spec.
in ssl3_get_server_hello where it reads the compression
algorithm number set by the server. It looks up the algorithm
in its own structures if the incoming algorithm number is
non-zero. The server always sends zero.
s3_srvr
=======
in ssl3_get_client_hello where it reads the compression
algorithm number set by the client.
In ssl3_send_server_hello after putting the cipher byte
it sends the compression algorithm byte if new_compression
is non-null (otherwise it sends zero). When it checks
new_compression it is null all the time.
s3_enc
======
It is examined in ssl3_change_cipher_state.
ssltest does not call this function but even if it did,
new_compression still has not been set.
In ssl3_setup_key_block it does do a lookup using
ssl_cipher_get_evp. It looks like this is what
should happen. However, ssl_setup_key_block
is not called! (in ssltest).
t1_enc
======
It is examined in tls1_change_cipher but
ssltest does not call this function.
IMO the ssltest program should end up calling either
ssl3_setup_key_block or ssl3_change_cipher_state.
I am not absolutely sure about this, since it does
not enter any state for which this would be the
correct thing to do, but it seems the only way
it is going to get the compression method established.
Please help me.
Regards,
Andrew M.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]