Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: unable to verify the first certificate / How to trust all certificates?

When I try to install an extension I get this error:

unable to verify the first certificate

I already know that the problem is our internal network structure, which wraps every SSL Certificate with our own and not every application trusts our certificate.

Is it possible to set the property Trust all SSL certificates in Visual Studio Code?

Thanks

like image 689
mfreiholz Avatar asked Nov 20 '15 06:11

mfreiholz


People also ask

How do I fix unable to get local issuer certificate?

When ssl certificate problem unable to get local issuer certificate error is caused by a self-signed certificate, the fix is to add the certificate to the trusted certificate store. Open the file ca-bundle. crt located in the directory above, then copy and paste the Git SSL certificate to the end of the file.

How do I verify OpenSSL certificate?

To verify a certificate with it's CRL, download the certificate and get its CRL Distribution Point. In the output you should see the CRL url. Next, download the CRL with the wget function. It will be in der format, so we will be converting it to pem format for the openssl verify function to work.

What does OpenSSL verify do?

Checks the validity of all certificates in the chain by attempting to look up valid CRLs. Normally if an unhandled critical extension is present which is not supported by OpenSSL the certificate is rejected (as required by RFC5280).

How do I disable SSL certificate verification in Axios?

You can configure axios to use a custom agent and set rejectUnauthorized to false for that agent: // At instance level const instance = axios. create({ httpsAgent: new https. Agent({ rejectUnauthorized: false }) }); instance.


2 Answers

Had the same problem.

Adding environment variable

NODE_TLS_REJECT_UNAUTHORIZED=0

fixed it. Took this answer from here: Ignore invalid self-signed ssl certificate in node.js with https.request?

like image 53
Max Avatar answered Sep 20 '22 10:09

Max


My solution was to add the following to user settings ( File -> Preferences -> User Settings)

"http.proxyStrictSSL": false
like image 21
Leandro Gomide Avatar answered Sep 22 '22 10:09

Leandro Gomide