Page 1 of 1

Running Socket over TLS

Posted: Thu Jul 07, 2022 4:51 am
by einschan
Hi,

Currently using native RPG to send / receive data through socket from server.
But now we need to use TLS, Does anyone has sample program ?.

There is sample program from IBM, but in C language.
https://www.ibm.com/docs/en/i/7.3?topic ... y-kit-apis

I just read the COMMSSLR4 and try to use http_select_commdriver.
And trying to rewrite the above C program to RPG

regards

Re: Running Socket over TLS

Posted: Thu Jul 07, 2022 10:11 pm
by Scott Klement

Re: Running Socket over TLS

Posted: Fri Jul 08, 2022 4:33 am
by einschan
Hi,

Thanks.

And I am studying your service program HTTPAPI
Can I use https_init to replace those below, (as in Figure 1 in your PDF) ?
- gsk_environment_open
- gsk_attribute_set_buffer
- gsk_environment_close
- gsk_attribute_set_enum

Then create the socket connection by "socket" afterwards.
- by CommTcp_ConnectNonBlock

Regards

Re: Running Socket over TLS

Posted: Fri Jul 08, 2022 8:44 am
by einschan
Hi Scott,

From COMMSSLR4, I think CommSSL_Connect in HTTPAPI can be used as your figure 3 in PDF
How about some function CommSSL_.... can be use as figure 2 , 4 and 5 ?

Regards