Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to skip certificate validation? #104

Open
naleczynskia opened this issue Jun 7, 2021 · 7 comments
Open

How to skip certificate validation? #104

naleczynskia opened this issue Jun 7, 2021 · 7 comments
Assignees

Comments

@naleczynskia
Copy link

naleczynskia commented Jun 7, 2021

I have a development website that uses a self-signed certificate for HTTPS. Thus I get the following:
Error: self signed certificate

How can I skip certificate validation?
What is the mechanism used to validate certificate?

@tanhakabir tanhakabir self-assigned this Jun 17, 2021
@LarryWMSN
Copy link

I'm getting Error: certificate signature failure when trying to connect to a asp.net site using .Net 6 and VS 2022 preview running in debug mode locally.

@githubdatabridge
Copy link

I also have the same issue on my end on localhost with https:

  • Error: self signed certificate

@marklnz
Copy link

marklnz commented Aug 3, 2021

Similar for me - I have a suite of microservices running in docker with ports exposed to localhost, and I use a locally generated certificate for SSL. I get "Error: unable to verify the first certificate" rather than the "Error: Self signed certificate" that others get.

@ipeevski
Copy link

My error is slightly different, but same issue - need a way to skip SSL validation.

Error:
"Error: unable to verify the first certificate"

@schmitty-0
Copy link

Hello,

any update on this?
It would be very useful to be able to at least disable the verification.

BTW: I've seen both errors "self signed certificate" and "unable to verify the first certificate" on different services

@noelhibbard
Copy link

My really hacky workaround was to add this line:
process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = 0;

As the first line of this file:
%USERPROFILE%\.vscode\extensions\tanhakabir.rest-book-6.0.1\dist\extension-node.js

If the extension gets an update I assume it will wipe out your change. It seems like a huge oversight to not have an option to ignore cert warnings. Especially considering how common it is to use self signed certs during the development phase of REST APIs.

@taisbak
Copy link

taisbak commented Jul 11, 2023

The above hack worked for me as well.

However, it would be great to have a proper solution.

The vscode extension Rest Client apparently knows how to do it.

Maybe guided by this article on Stack Overflow: Error: unable to verify the first certificate in nodejs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants