This is probably a big fat 'no' but I have a current socket architecture that is 3-tiered. Tier 1 does nothing but set up the requisite steps in order to become a vanilla socket server and then sits in a loop forever calling accept(). When accept() returns successfully that now-open socket is passed via sendmsg() to a pool of tier-2 programs that grab the socket and begin reading the contents and saving the contents in a temp file. This tier-2 program then reads the initial data and determines which handler (tier-3) program it should call to process the data for a response back on the socket. Presently tier-2 passes the still-open socket to the tier-3 handler program via spawnp(). The tier-3 program process the data and builds a response back to the original source somewhere on the internet. I'm looking to adapt my vanilla socket system to SSL using GSK, so I need some method to pass a GSK session handle or *something* to my tier-3 program but have been unsuccessful so far. This tier-3 program is the one that finally does any final close() on the socket after a response has been sent.
Pinned topic GSK SSL API - Can you pass an open session handle to a child job started with spawnp()?
brataj 100000816311 PostsACCEPTED ANSWER
Re: GSK SSL API - Can you pass an open session handle to a child job started with spawnp()?2014-01-25T00:08:40Z in response to TB2T_Kelly_Beard
The API is expected to run within one process, so you'd have to run your handshake and reading/writing from the actual socket all in tier-2. Then you could use pipes to tier-3, for example.
The other alternative is to use AT-TLS, which does SSL within the TCP/IP stack and presents the decrypted data stream to the application. That would let you leave your programs largely untouched.
TB2T_Kelly_Beard 270002TB2T4 Posts
This reply was deleted by SystemAdmin 110000D4XK 2014-10-16T18:16:38Z.