Hello, I try to set up an SSL connection, but it fails when I call SSL_connect() with SSL_ERROR_WANT_READ. I have written it it is show in the openSSL doc. To test it I run openssl s_server -accept 1234 -cert server.pem -state
In my sample app I call SSL_CTX* K_OpenSSLVerbindung; SSL* K_SSLStruktur; int K_SSL_Fehlercode; SSL_library_init(); SSL_load_error_strings(); K_OpenSSLVerbindung=SSL_CTX_new(SSLv23_client_method()); K_SSLStruktur=SSL_new(K_OpenSSLVerbindung); SSL_set_fd(K_SSLStruktur,socketDescriptor()); K_SSL_Fehlercode=SSL_connect(K_SSLStruktur); K_SSL_Fehlercode will be -1 at this time. K_SSL_Fehlercode=SSL_get_error(K_SSLStruktur,K_SSL_Fehlercode); now it will be 2(SSL_ERROR_WANT_READ) socketDescriptor() will return an file descriptor of an QTcpSocket On the console in witch the openssl server runs I can read: SSL_accept:before/accept initialization SSL_accept:SSLv3 read client hello A SSL_accept:SSLv3 write server hello A SSL_accept:SSLv3 write certificate A SSL_accept:SSLv3 write key exchange A SSL_accept:SSLv3 write server done A SSL_accept:SSLv3 flush data any idea's what goes wrong??
smime.p7s
Description: S/MIME Cryptographic Signature