On Wed, Apr 18, 2001 at 02:14:00PM +0100, lucy brophy wrote:
> 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.
It should not be too difficult. I just had the same discussion several
minutes ago.
As explained in the manual page for SSL_get_error(), you can have several
values:
#define SSL_ERROR_NONE 0
#define SSL_ERROR_SSL 1
#define SSL_ERROR_WANT_READ 2
#define SSL_ERROR_WANT_WRITE 3
#define SSL_ERROR_WANT_X509_LOOKUP 4
#define SSL_ERROR_SYSCALL 5 /* look at error stack/return value/er
rno */
#define SSL_ERROR_ZERO_RETURN 6
#define SSL_ERROR_WANT_CONNECT 7
_NONE is clear and will not occur when SSL_connect() returned -1,
WANT_* are not errors but temporary conditions, call SSL_connect() again
to complete the sequence, until success or failure was reached.
If _SSL or _SYSCALL occurs, call ERR_get_error() to find out the reason
of the failure.
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]