Running Socket over TLS

Discussions related to HTTPAPI (An HTTP Client Package for RPG programming.) http://www.scottklement.com/httpapi/
Post Reply
einschan
Posts: 9
Joined: Thu Jul 07, 2022 4:36 am

Running Socket over TLS

Post 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
Scott Klement
Site Admin
Posts: 636
Joined: Sun Jul 04, 2021 5:12 am

Re: Running Socket over TLS

Post by Scott Klement »

einschan
Posts: 9
Joined: Thu Jul 07, 2022 4:36 am

Re: Running Socket over TLS

Post 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
einschan
Posts: 9
Joined: Thu Jul 07, 2022 4:36 am

Re: Running Socket over TLS

Post 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
Post Reply