lua-resty-http and ssl

2,053 views
Skip to first unread message

cga...@gmail.com

unread,
Jul 13, 2015, 7:24:52 AM7/13/15
to openre...@googlegroups.com
I'm using https://github.com/pintsized/lua-resty-http to issue HTTP POST requests. In the error log file I keep getting the following error message:

failed to request: 20: unable to get local issuer certificate

How do I configure openresty with the root certificate and alternatively how can I configure my resty http client to ignore cert mismatches?

ta,
Chris

Hamish Forbes

unread,
Jul 13, 2015, 9:54:23 AM7/13/15
to openre...@googlegroups.com
You probably need to set https://github.com/openresty/lua-nginx-module#lua_ssl_trusted_certificate to your system CA bundle (or the specific root CA certs for your target server).
You might need to tweak the lua_ssl_verify_depth option too.

If you're using the 'simple' request_uri() interface then set ssl_verify = false in your params table to skip verification. https://github.com/pintsized/lua-resty-http#request
Otherwise you are calling ssl_handshake() yourself and just need to set the option there.

It would help if you posted a full example of how you're using resty-http though.

Hamish
Reply all
Reply to author
Forward
0 new messages