Topic
No replies
TB2T_Kelly_Beard
TB2T_Kelly_Beard
4 Posts
ACCEPTED ANSWER

Pinned topic GSK SSL API - Can you pass an open session handle to a child job started with spawnp()?

‏2014-01-22T22:32:07Z |

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.

Updated on 2014-01-22T22:34:14Z at 2014-01-22T22:34:14Z by TB2T_Kelly_Beard
  • brataj
    brataj
    11 Posts
    ACCEPTED 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.

    Bernie

    • TB2T_Kelly_Beard
      TB2T_Kelly_Beard
      4 Posts
      ACCEPTED ANSWER

      Re: GSK SSL API - Can you pass an open session handle to a child job started with spawnp()?

      ‏2014-01-27T15:53:36Z  in response to brataj

      I've never heard of AT-TLS, but I'll look it up.  We're using IBM i V7R1 if that matters.

      • brataj
        brataj
        11 Posts
        ACCEPTED ANSWER

        Re: GSK SSL API - Can you pass an open session handle to a child job started with spawnp()?

        ‏2014-01-27T16:45:25Z  in response to TB2T_Kelly_Beard

        I was answering from a z/OS perspective...

  • This reply was deleted by SystemAdmin 2014-10-16T18:16:38Z.