Hello!
2016-02-14 4:40 GMT-08:00 瞿秋丰:
> 对方报错是 20: unable to get local issuer certificate
> openresty 这边需要配置什么呢?
>
这个错误一般是因为
1. 没有正确配置 lua_ssl_trusted_certificate 指令(默认是没有信任的根 CA 证书的):
https://github.com/openresty/lua-nginx-module#lua_ssl_trusted_certificate
2. 没有正确配置 lua_ssl_verify_depth 指令(默认的 level 比较底):
https://github.com/openresty/lua-nginx-module#lua_ssl_verify_depth
在 ngx_lua 模块的官方测试集中就有专门的用例,专门测试产生此错误消息的不正确的配置:
https://github.com/openresty/lua-nginx-module/blob/master/t/129-ssl-socket.t
可供参考。
Regards,
-agentzh