Unable to verify leaf signature
Note: the following is dangerous, and will allow API content to be intercepted and modified between the client and the server.
This also worked
process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0';
UNABLE_TO_VERIFY_LEAF_SIGNATURE from request with Firebase functions node.js with Certificate (pfx)
Bank-ID provided a CA as a text in their documentation. Starting with "-----BEGIN CERTIFICATE"... I copied the text into a pem file and referenced it from my index.js-file like this:
agentOptions: {
pfx: fs.readFileSync('bankidtest.pfx'),
passphrase: '*****',
ca: fs.readFileSync('certificate.pem')
},
Node - Unable to Verify the First Certificate / UNABLE_TO_VERIFY_LEAF_SIGNATURE localhost
You'll need to tell axios/node what signing authorities to trust (your browser and postman will already have several of those set up)
You do that by configuring the https agent in axios - have a look at this answer for an example : How to configure axios to use SSL certificate?
And here are instructions on how to get the bundle from the browser (you'll probably need to use a p7b/pfx or get all certs in the chain): https://medium.com/@menakajain/export-download-ssl-certificate-from-server-site-url-bcfc41ea46a2
Related Topics
How to Convert the "Arguments" Object to an Array in JavaScript
How to Call 3 Functions in Order to Execute Them One After the Other
Safari 3Rd Party Cookie Iframe Trick No Longer Working
What's the Difference Between Window.Location= and Window.Location.Replace()
(![]+[])[+[]]... Explain Why This Works
Angularjs - Any Way for $Http.Post to Send Request Parameters Instead of JSON
How to Create Multidimensional Array
How to Create a Function from a String with JavaScript
How to Convert Date to Timestamp
Check If Event Exists on Element
Detecting When a Div's Height Changes Using Jquery
Making Custom Right-Click Context Menus for My Web-App
How to Get Elements with Multiple Classes
Is There a Built-In Way to Loop Through the Properties of an Object