Hi,
    I wrote a server program that containing 3 executable file.
When the main executable file executed, it will execve another 2 executable
file and using pipe to communicate with them.

Main executable = [Request Parser]
Other 2 executable = [Request Handler]

Request handling procedure:
1: The [Request Parser] is listening to new connection, when got new client
connection, it read the request (text input from client) connection, then
parse the text and decide which [Request Handler] process it should send the
connection socket and request content to.

2: When the right [Request Handler] received the "request" and connection
socket from [Request Parser], then it process the request,

3: Finally, the [Request Handler] output(write) the requesting content(text)
to connection socket, then pass the connection socket back to [Request
Parser] for keepalive that listen to another request from same client. 

##################################
Now, I want to implement the OpenSSL to the server that encrypt the
communication between the server and client.
Due to performance issue, I don't want to use external process like stunnel
to encrypt the communication between server and client, I want to add it
directly to the server coding that change read() to SSL_read() and write()
to SSL_write().


Because upon the handling model, when got new SSL connection from client,
the [Request Parser] called SSL_accept() and SSL_read(), then pass
connection socket to [Request Handler], I think the [Request Parser] should
also pass the SSL connection object to [Request Handler], so the "Request
Handler" could call SSL_write to output the content(text) to the client.

So, how the [Request Parser] share SSL object/connection with the [Request
Handler] or pass the SSL object connection from to [Request Handler]? So the
"Request Handler" could correctly using SSL_write and SSL_read to
communicate with client.


   I have been searching the solution on the mailing list in the past few
days, but no solution is found. Hope someone could reply me and help to
solve the problem.

Thanks a lot!

Horace Li

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to