Open CajunDust opened 5 years ago
ADDENDUM:
It seems that is DOES work, but ONLY when you specify this as an option on the constructor of the Client:
const Client = require('node-rest-client').Client;
....
var client = new Client({
connection: {
ca: fs.readFileSync('tailorfit.txt')
}
});
...
let options = {
// other options...
}
...
let req = client.get(url, options, function (data, response) {
// .... no more errors !!!!
}),
So specifying it in the options of a specific request (get/post/...) does not take into account the CA that is imported...
可否给个详细的配置说面,关于https的说明一点都没有呢
When I try to request resources from a https server that has an own certificate (valid, not a self signed), apparrently I get an error : UNABLE_TO_VERIFY_LEAF_SIGNATURE
Details:
I tried to create a cert file from the intermediate and domain certificate, and add it as specified on the https lib, but this does not work...
Does this client lib not support adding the "ca" to the options ? e.g.
Example of our CRT file: tailorfit.txt
This works with the plain https library ! e.g. via code: