0

Using Download-file npm from https protocol shows the below error,

Error: self signed certificate in certificate chain

I added the below options,

 rejectUnauthorized: false,
 requestCert: true,
 agent: false

still not working

Saurabh Mistry
  • 12,833
  • 5
  • 50
  • 71
Pooja
  • 85
  • 1
  • 2
  • 15
  • please provide some code – Akash Dathan Feb 15 '18 at 11:38
  • Possible duplicate of [Ignore invalid self-signed ssl certificate in node.js with https.request?](https://stackoverflow.com/questions/10888610/ignore-invalid-self-signed-ssl-certificate-in-node-js-with-https-request) – scagood Feb 15 '18 at 11:46
  • when i run the url in browser, it downloads a pem file for me... – Pooja Feb 15 '18 at 11:50
  • I same i have to do it via API – Pooja Feb 15 '18 at 11:50
  • All i want is, my API has to download that pem file when i run that url – Pooja Feb 15 '18 at 11:52
  • /var options = { directory: "./New", filename: "New.pem", rejectUnauthorized: false, requestCert: false, agent: false } download(url, options, function(err){ if (err) throw err console.log("downloaded") }) – Pooja Feb 15 '18 at 11:57
  • Using Download-file npm from https protocol shows the below error, Error: self signed certificate in certificate chain – Pooja Feb 16 '18 at 04:59

0 Answers0