lua-resty-http
lua-resty-http copied to clipboard
[Question] Does connect function do not allowed the self-signed client cert and private key
When I use the code like:
httpc:connect(
{
scheme = scheme,
host = host,
port = port,
ssl_client_cert = ssl_client_cert,
ssl_client_priv_key = ssl_client_priv_key
}
)
The ssl_client_cert and ssl_client_priv_key is a self-signed certificate, then I got the below error message:
Request failed: Connection attempt failed: 19: self signed certificate in certificate chain
BTW, the same cert and key works well by using ssl.https.request with the below code:
luasocket_https.request {
url = url,
headers = headers,
source = ltn12.source.string(body),
sink = ltn12.sink.table(resp_buffer),
key = ssl_client_priv_key,
certificate = ssl_client_cert
}
My question is:
The connect function of lua-resty-http does not support for a given self-signed certificate?