The code itself is simple: Basically, just establish the socket connection. 
Then:

SSL_set_fd(ssl, sock);


ret = SSL_accept(ssl); (or SSL_Connect for the client)

if (ret<= 0) 
   { print errors }
else
    OK


----- Original Message -----
From: Nathan Smyth <naf...@ymail.com>
To: "openssl-users@openssl.org" <openssl-users@openssl.org>
Cc: 
Sent: Tuesday, 10 April 2012, 14:24
Subject: Accept failing - SysCall error - advice?

Hi there,

I'm having trouble getting the SSL Connect/Accepts to work.

For the client, SSL_Connect returns -1. Raising SSL Error = 2, 
SSL_ERROR_WANT_READ

For the server, SSL_ACCEPT returns 0 (or -1 if non blocking), raising SSL Error 
5 = SSL_ERROR_SYSCALL.
ERR_ERROR_STRING() prints:00000005:lib(0):func(0):DH 

Does anyone have any advice on things to try to help debug this? I'm not using 
BIOs, but instead using SSL_set_fd(). This is because the application uses many 
sockets, but only sometimes uses SSL.

Thanks!!
______________________________________________________________________
OpenSSL Project                                http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                          majord...@openssl.org

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to