Bug 173399 - upgrade to 0.9.8a broke use of SSLv23_method() with SSL_OP_NO_SSLv2
Summary: upgrade to 0.9.8a broke use of SSLv23_method() with SSL_OP_NO_SSLv2
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: openssl
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tomas Mraz
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks: 173401
TreeView+ depends on / blocked
 
Reported: 2005-11-16 22:56 UTC by Jason Vas Dias
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version: openssl-0.9.8a-3
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-11-22 16:02:32 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
test program tarball (2.04 KB, application/octet-stream)
2005-11-16 22:56 UTC, Jason Vas Dias
no flags Details

Description Jason Vas Dias 2005-11-16 22:56:35 UTC
Created attachment 121152 [details]
test program tarball

Comment 1 Jason Vas Dias 2005-11-16 22:56:35 UTC
Description of problem:

If a server and client both use :
  ssl_ctx = SSL_CTX_new( SSLv23_method() )
to initialize the ssl context, and both set the SSL_OP_NO_SSLv2 ssl option :
  sslopt = SSL_OP_ALL | SSL_OP_NO_SSLv2 ;
  SSL_CTX_set_options(ssl, sslopt);
then the client cannot connect to the server.

Eg. for a server that can to support both v2 and v3 clients, but can be
configured to support only v3 clients, as for the tog-pegasus cimserver,
for which the FC-5 upgrade to openssl-0.9.8a broke SSL support .

The example program in fc5_ssl_bug.tar.gz demonstrates the problem:
  $ gunzip < fc5_ssl_bug.tar.gz | tar -xpf -
  $ cd ssl
  $ make
  ...
  $ B='' make test
./svr  & echo $!>svr.pid ;sleep 1;
./cli ;
SSL_accept failure: -1 1
7982:error:1408F455:lib(20):func(143):reason(1109):s3_pkt.c:426:
SSL_accept failed
...
  $ make test
./svr -b & echo $!>svr.pid ;sleep 1;
./cli -b;
--- CLIENT 127.0.0.1 CONNECTED
hello
world
--- CLIENT 127.0.0.1 DISCONNECTED
kill `cat svr.pid`;
rm -f svr.pid

Without supplying the -b option test programs, they do:
  
  ssl_ctx = SSL_CTX_new( SSLv3_method() ); 
  ...
  sslopt = SSL_OP_ALL ;
  SSL_CTX_set_options(ssl, sslopt);

This makes them work OK . With the -b option, they do:
  ssl_ctx = SSL_CTX_new( SSLv23_method() ); 
  ...
  sslopt = SSL_OP_ALL | SSL_OP_NO_SSLv2 ;
  SSL_CTX_set_options(ssl, sslopt);
and this makes the server fails with the SSL_accept failure ,
whereas under 0.9.7f, or on FC-4, the above options work fine.

Version-Release number of selected component (if applicable):
openssl-0.9.8a

How reproducible:
100%

Steps to Reproduce:
Run test program in attached 'fc5_ssl_bug.tar.gz' :
  $ gunzip < fc5_ssl_bug.tar.gz | tar -xpf -
  $ cd ssl
  $ make
  $ B='' make test
  
Actual results:
Server fails with SSL_accept error

Expected results:
Same results as for
  $ make test

Additional info:  
  See attached fc5_ssl_bug.tar.gz

Comment 2 Tomas Mraz 2005-11-22 16:01:58 UTC
Apparently the problem happens now because zlib compression is enabled by
default in OpenSSL 0.9.8. (If its explicitely enabled with the OpenSSL 0.9.7 the
problem happens there too.) I've switched it off for now.

Please try openssl-0.9.8a-3 if it resolves the problem.


Comment 3 Jason Vas Dias 2005-11-22 17:20:50 UTC
Yes, openssl-0.9.8a-3 resolves the problem - thanks!



Note You need to log in before you can comment on or make changes to this bug.