On Wed, Apr 11, 2001 at 05:13:17PM +0100, lucy brophy wrote:
> I have been working on a problem that involves ammonite calling some
> openssl functions.
> it does the following:
> ssl_handle = SSL_new (ssl_context);
> SSL_set_fd (ssl_handle, fd);
> SSL_connect (ssl_handle);

So I assume that you have a problem with SSL_connect(), right?
If SSL_connect() returns -1, use SSL_get_error() to find out the
reason. If it is a hard error, OpenSSL will have the error message
in the error queue.
This information will be most helpful in tracking down the problem.

> This means that s->session->cipher is never getting set.  Should it be
> getting set in this function? If not is it set by the SSL_connect code
> at all?  There is a test in the code afterwards that requires it to be
> set.

s->session->cipher is only set somewhere in SSL_connect() and you can
only expect it to have a valid information once SSL_connect() succeeded
(with a return value of 1). If SSL_connect() failed, you cannot expect
any useful information returned by SSL_get_cipher() or other similar
functions. The behaviour is undefined.

Best regards,
        Lutz
-- 
Lutz Jaenicke                             [EMAIL PROTECTED]
BTU Cottbus               http://www.aet.TU-Cottbus.DE/personen/jaenicke/
Lehrstuhl Allgemeine Elektrotechnik                  Tel. +49 355 69-4129
Universitaetsplatz 3-4, D-03044 Cottbus              Fax. +49 355 69-4153
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to