Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1518

nodejs - error self signed certificate in certificate chain

$
0
0

I am facing a problem with client side https requests.

A snippet can look like this:

var fs = require('fs');var https = require('https');var options = {    hostname: 'someHostName.com',    port: 443,    path: '/path',    method: 'GET',    key: fs.readFileSync('key.key'),    cert: fs.readFileSync('certificate.crt')}var requestGet = https.request(options, function(res){    console.log('resObj', res);}

What I get is Error: self signed certificate in certificate chain.

When I use Postman I can import the client certificate and key and use it without any problem. Is there any solution available?? I would also like to be given some lights on how postman handles the certificates and works.


Viewing all articles
Browse latest Browse all 1518

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>