Hello, It seems that I must use IP as dns resolve is not available, so my first query is resolved. Was just wondering if anyone has some pointers about the connection over ssl part? If it is possible to have hostname verification or something like certificate pinning? I couldn't find anything about this.Thanks for your help.
On Wed, 2 Jun 2021, 19:21 reshma r, <[email protected]> wrote: > Hi all, > Can anyone help with how I can specify a domain name rather than an IP > address in the socket connect code below? If I try to specify a domain I > get an error. Also, I guess with the code below, host name verification > would not be done in case of ssl connection. How would I go > about enabling it? Thanks for your help. > > local addr = 'xx.xx.xx.xx' -- how can I specify domain name instead of IP > address? if https then -- with ssl connect = socket:connect_ssl(addr, 443) > write_log("connecting via https to endpoint", core.info) else -- without > ssl connect = socket:connect(addr, 80) write_log("connecting via http to > endpoint", core.info) end > > >

