-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
an error occurred trying to connect: invalid certificate: UnknownIssuer #2301
Comments
Just tried and works fine, do you use any proxy server? |
yes @bartlomieju. Thanks for reminding. By disabling proxy now i have successfully executed . But now while importing http module i am facing other error.
first-server.ts
|
Related issue: #1383 |
I ran into the same problem, but I really need a proxy $ deno -v
deno: 0.19.0
v8: 7.9.110
typescript: 3.6.3
$ deno https://deno.land/welcome.ts
Download https://deno.land/welcome.ts
WARN RS - rustls::session:815 - Sending fatal alert BadCertificate
https://deno.land/welcome.ts: error trying to connect: invalid certificate: UnknownIssuer |
@saibing if you need a proxy you can use |
I have set these environment variables. I use cntlm proxy on ubuntu 19.04. |
I'm in a corporate environment with transparent proxies and self signed certificates. Some way of adding a trusted cert or ignoring invalid certs would be helpful. $ deno -v
deno: 0.23.0
v8: 7.9.317.12
typescript: 3.6.3
$ deno https://deno.land/std/examples/welcome.ts
Download https://deno.land/std/examples/welcome.ts
WARN RS - rustls::session:815 - Sending fatal alert BadCertificate
https://deno.land/std/examples/welcome.ts: error trying to connect: invalid certificate: UnknownIssuer |
I'm trying to use Deno to write a Kubernetes API client. Almost all Kubernetes servers use a self-signed ca setup, so this feature is crucial. Is this coming anytime soon? |
I think this should be straight-forward to add |
Thanks for your quick response. Because certificate requirements vary per API server and a single client should be able to connect to multiple servers at once, I believe we should provide it as a per-session option. Perhaps, we need a concept of configurable "connection pool" behind Moreover, Kubernetes API Client must be able to parse |
@asyncmax it looks like your use case is yet another beast. Example provided by @tdillon that needs single certificate for transparent proxy is simple, but providing certificates for |
@bartlomieju As far as I know, there is no such spec in BTW, is the TLS connection through |
I guess this might be the place for a library in userland.
Right now our HTTP client is one-off, there's an issue for that #3068 as well as PR #3099. It's waiting for upgrade to Tokio 0.2. Once we upgrade HTTP client will have connection pool and reuse connections. |
Yes, I agree. Maybe keep-alive was a bad example.
Sounds good. I guess what I want is a new Deno API that allows userland code to configure TLS parameters of the HTTP client. |
@asyncmax would you mind opening a new issue describing all of your needs there? After some thinking I came to a conclusion that we could expose JS API for creating Rust HTTP client with very little cost (it'd be a resource) so one could leverage some capabilities of |
@bartlomieju No problem. I will gladly do that soon. |
Actually I won't be able to work on that due to more priority work on core. If anyone wants to work on this I can provide some tips. |
Related/Duplicate of #1371? |
@bartlomieju I would like to try to fix this if you could give me those tips.
Although, for my purposes, I was able to change Looks like that will use the native system on windows and osx, but openssl on linux, and I guess it's been decided to not use openssl for security reasons. I could make it conditionally compile in native_tls for windows and mac, but use rustls_tls on linux. Imho that would be really nice if it just worked out of the box on mac and windows. |
So
CC @ry |
@geoFlux I received this error on a Mac on a corporate network while running this test suite. I can verify that your suggestion works. I wish I could help figure out a better solution. |
The > deno --version
deno 1.0.0-rc1
v8 8.2.308
typescript 3.8.3 > deno run --cert corporate.pem https://deno.land/std/examples/welcome.ts
Download https://deno.land/std/examples/welcome.ts
Compile https://deno.land/std/examples/welcome.ts
Welcome to Deno 🦕 |
Iam trying to Connect Heroku Postgres but getting the same issue in title. Can anyone help? ARN RS - rustls::session:718 - Sending fatal alert BadCertificate |
I'm having the same issue on my work computer deno version
any ideas? |
From my home network (no proxy, no VPN), sending a request to a public website, I have the problem too:
Is there a plan to rectify this? It’s been over a year since the issue was opened. |
@firmanjabar I'm getting following error:
|
Same error, can't connect to PostgreSQL on Linode VPS, the PostgreSQL is on the same host. I fixed it by using
|
Same on my side, will take a look into it. |
for corporate/mitm certs, you can also consider |
Thank you @rinsuki that hint saved me hours of time ❤️ |
Hi,
Just installed deno and try to run welcome.ts file which is mentioned in docs, i am facing this issue. Details are below.
Anybody faced this issue.
The text was updated successfully, but these errors were encountered: