Hi!
I have a typical problem. I have derived my socket class from CAsyncSocket.
This is a server application. Whenever my client tries to connect, in OnAccept() function of my class, I try to do an SSL_accept.
Sometimes it succeeds, some times it fails and sometimes, it gives the following error:
This is a trace, the communication between the client and the server.
Response: 150 Connection accepted CDataSocket::InitialiseSSL(): error:00000000:lib(0):func(0):reason(0) COMMAND: STOR, ARGS: test-image1.pdf CDataSocket::InitialiseSSL(): SSL_ERROR_WANT_READ CDataSocket::InitialiseSSL(): error:140940F5:SSL routines:SSL3_READ_BYTES:unexpected record |
SSL_WANT_READ occurs whenever I try to do an SSL_accept.
Can anyone help me on this.
The initialization of SSL is done in the following way:
SSL_load_error_strings();
ERR_load_ERR_strings();
SSLeay_add_ssl_algorithms();
m_pDataMethod = SSLv23_server_method();
m_pDataCTX = SSL_CTX_new (m_pDataMethod);
SSL_CTX_set_options(m_pDataCTX, SSL_OP_NO_SSLv2);
The certificartes are validated here. then,
m_pDataSSL = SSL_new (m_pDataCTX);
Then SSL_Accept in OnAccept of my socket class.
Thanks & Regards,
Seetharam.
Sitaram,
Sharp Software Development India,
Level 3,
Innovator, ITPL,
Bangalore.
Telephone:
Res# 25525196
Mob# 94488 53090
Yahoo! Mail
Stay connected, organized, and protected. Take the tour