Openssl Ssl Connect Error 5
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions ssl_get_error error codes you might have Meta Discuss the workings and policies of
Ssl_get_error 5
this site About Us Learn more about Stack Overflow the company Business Learn more about hiring ssl_get_error error code=5 developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is
Ssl Error Code 5
a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up OpenSSL ssl_accept() error 5 up vote 2 down vote favorite I have scoured Stack Overflow and the internet, but I have been unable to locate an answer to why ssl_accept() keeps returning: ssl_connect error 5 [DEBUG] SSL_accept() : Failed with return 0 [DEBUG] SSL_get_error() returned : 5 [DEBUG] Error string : error:00000005:lib(0):func(0):DH lib [DEBUG] WSAGetLastError() returned : 0 [DEBUG] GetLastError() returned : 0 [DEBUG] ERR_get_error() returned : 0 Edit: Out of interest ssl_accept() returns 0, defined as (accordingly to the scant and unhelpful OpenSSL documentation): "The TLS/SSL handshake was not successful but was shut down controlled and by the specifications of the TLS/SSL protocol. Call SSL_get_error() with the return value ret to find out the reason." Below is the snippet of the server side, could I be barking up the wrong tree and this issue be caused by client code? client = accept( server, (sockaddr*) &clientsockaddrin, &len ); SSL* ssl = SSL_new( ctx ); SSL_set_fd( ssl, client ); std::cout << "+--------------------------------------------------+" << std::endl; int r = SSL_accept( ssl ); if ( r != 1 ) { int err_SSL_get_error = SSL_get_error( ssl, r); int err_GetLastError = GetLastError(); int err_WSAGetLastError = WSAGetLastError(); int err_ERR_g
DESCRIPTION SSL_connect() initiates the TLS/SSL handshake with a server. The communication channel must already have been set and assigned to the ssl by setting
Error:00000005:lib(0):func(0):dh Lib
an underlying BIO. NOTES The behaviour of SSL_connect() depends on the
Ssl_error_syscall 5
underlying BIO. If the underlying BIO is blocking, SSL_connect() will only return once the handshake has been ssl_read error 5 finished or an error occurred. If the underlying BIO is non-blocking, SSL_connect() will also return when the underlying BIO could not satisfy the needs of SSL_connect() to http://stackoverflow.com/questions/23479376/openssl-ssl-accept-error-5 continue the handshake, indicating the problem by the return value -1. In this case a call to SSL_get_error() with the return value of SSL_connect() will yield SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE. The calling process then must repeat the call after taking appropriate action to satisfy the needs of SSL_connect(). The action depends on the underlying BIO. https://www.openssl.org/docs/ssl/SSL_connect.html When using a non-blocking socket, nothing is to be done, but select() can be used to check for the required condition. When using a buffering BIO, like a BIO pair, data must be written into or retrieved out of the BIO before being able to continue. RETURN VALUES The following return values can occur: 0 The TLS/SSL handshake was not successful but was shut down controlled and by the specifications of the TLS/SSL protocol. Call SSL_get_error() with the return value ret to find out the reason. 1 The TLS/SSL handshake was successfully completed, a TLS/SSL connection has been established. <0 The TLS/SSL handshake was not successful, because a fatal error occurred either at the protocol level or a connection failure occurred. The shutdown was not clean. It can also occur of action is need to continue the operation for non-blocking BIOs. Call SSL_get_error() with the return value ret to find out the reason. SEE ALSO SSL_get_error, SSL_accept, SSL_shutdown, ssl, bio, SSL_set_connect_state, SSL_do_han
Related messages: [ Next message ] [ Previous message ] [ Maybe in reply to ] https://curl.haxx.se/mail/lib-2003-01/0093.html [ Next in thread ] [ Replies ] From: Naren D