Support for use_ssl_cert?
See original GitHub issueHey there, Recently I encountered SSL certificate errors while calling Azure AD graph API using this library:
[Error: unable to verify the first certificate] code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE'
Then I looked it up and found this issue: Azure/azure-sdk-for-ruby#493, which seems pretty similar to my issue. The only problem - I couldn’t find anything similar to use_ssl_cert in the NodeJS SDK. So, my question is - what can I do?
Thanks! Omer
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Use a TLS/SSL certificate in your code in Azure App Service
This how-to guide shows how to use public or private certificates in your application code. This approach to using certificates in your code ......
Read more >How to use SSL Cert in Java Code in Azure App Service
I am trying to call a back-end API from Java Client which uses SSL authentication. For .Net there is a snippet available on...
Read more >Use SSL-Cert for Panel: "Main"-IP has multiple customers on it...
Hi there, I got a SSL-Cert for my panel. The server uses different IPs. The Cert is created for the "main-IP" of the...
Read more >How to Install an SSL Certificate on a Debian Server
To help you pick the ideal SSL certificate, we built a couple of exclusive SSL tools. ... You can use ssl-cert-check, a small...
Read more >here we stand student book
We are supporting Israel and fighting antisemitism around the world. ... to encourage > people to use SSL-cert-based authentication in low-trust situations.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Node.js has a static list of trusted cert authorities as can be seen here. If you are behind a corporate proxy or a firewall, it cannot verify the certificate and you get the above error. Hence to solve this issue, node.js provided a mechanism to users where they can provide their own system trusted certs to be added to the static list. node.js should then not fail on certificate verification.
Documentation of the environment variable:
NODE_EXTRA_CA_CERTS=file#
Added in: XXX When set, the well known “root” CAs (like VeriSign) will be extended with the extra certificates in file. The file should consist of one or more trusted certificates in PEM format. A message will be printed to stderr (once) if the file is missing or misformatted, but any errors are otherwise ignored.
Note that neither the well known nor extra certificates are used when the ca options property is explicitly specified for a TLS or HTTPS client or server.
Take a look at this issue on node.js github repo for more info. https://github.com/nodejs/node/issues/4175.
@omerlh - This was inherently a bug in node.js itself. node.js used a static list of trusted certs which were hard coded in code.
with new version of node.js v4.8.0 or 6.10.0, (documentation over here) you can set the following environment variable:
set NODE_EXTRA_CA_CERTS=<path-to-pem-file>
and run the script again. This should work fine.