nodejs – error self signed certificate in certificate chain

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.

127 thoughts on “nodejs – error self signed certificate in certificate chain”

  1. A person essentially assist to make severely articles I might state.

    That is the first time I frequented your website page and up to now?
    I surprised with the analysis you made to make this actual post amazing.
    Magnificent process!

    Reply
  2. I’m pretty pleased to discover this website. I need to to thank you for your
    time due to this fantastic read!! I definitely savored every part of it
    and I have you saved as a favorite to see new information on your website.

    Reply
  3. Thank you, I’ve just been looking for information approximately this subject for a while and yours is the greatest
    I have came upon so far. But, what about the conclusion? Are you positive about the
    source?

    Reply
  4. My spouse and I stumbled over here different web page and thought I might as well check things out.
    I like what I see so i am just following you. Look forward to
    going over your web page repeatedly.

    Reply
  5. hey there and thank you for your information – I
    have definitely picked up anything new from right
    here. I did however expertise several technical points using this website,
    since I experienced to reload the site a lot
    of times previous to I could get it to load properly.
    I had been wondering if your hosting is OK? Not that I’m complaining, but sluggish loading instances
    times will very frequently affect your placement in google and could damage your quality score if ads
    and marketing with Adwords. Anyway I’m adding this RSS to
    my e-mail and can look out for a lot more of
    your respective fascinating content. Ensure that you update this again very soon.

    Reply
  6. Hello there, I found your site by way of Google at the same time as looking
    for a similar subject, your web site got here up, it looks good.
    I have bookmarked it in my google bookmarks.

    Hi there, simply became aware of your weblog through Google,
    and found that it is truly informative. I am gonna be
    careful for brussels. I will appreciate if you happen to continue this in future.
    Numerous other folks will probably be benefited out of your writing.
    Cheers! scoliosis surgery https://0401mm.tumblr.com/ scoliosis
    surgery

    Reply

Leave a Comment