Apologies for the delay in replying...
Thank you for the help; SSL_connect() was indeed failing with a -1.
However, the test in the code was for failure with a 0 so I didn't
notice that until you pointed it out. That code has now been fixed.
I was unable to extract any useful information by using the
SSL_get_error(), but if you know of a good sample code that I could copy
I could try again.
Thanks
Lucy Brophy
Lutz Jaenicke wrote:
>
> 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]
--
You can't stay mad at someone who makes you laugh.
-- Jay Leno
=====================================================================
Lucy Brophy
Sun Microsystems Ireland Ltd
East Point Business Park
Dublin 3
Ireland
Tel: +353 1 8199072
eMail: [EMAIL PROTECTED]
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]