-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
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
Using curl
to retrieve a HTTPS url that requires a self-signed certificate fails on macOS
#337982
Comments
I got around this issue by exporting the keychains in Keychain to a single PEM-encoded PEM file, and exporting the path to
Adjust as needed. |
I also experienced this with a x86 system, adding the I think this should be reopened.
EDIT: I might have been too hasty, i found this issue upstream, so it's not specific to NixOS. If i modify the curl command to specifically use
EDIT 2: Interestingly i don't get this error when i use the package "curlWithgnuTls":
|
curl
to retrieve a HTTPS url that requires a custom DNS server fails on macOScurl
to retrieve a HTTPS url that requires a self-signed certificate fails on macOS
I believe that this is caused by:
A fix here would be to possibly grab Apple's patches, assuming that they are open source (uh. hopefully.) and use them on macOS in nixpkgs, or to configure nixpkgs curl to use SecureTransport. Both of these seem okay to me at least. |
Some very lazy patching causes |
In case it helps: I have exactly the same issue except the error message is different: $ curl "https://unsplash.localhost"
curl: (35) TLS connect error: error:80000002:system library::No such file or directory |
@OliverJAsh that's this bug fix: #351920 |
Describe the bug
Let's say you have a website at
https://testing.local
, and you need to set your DNS server tow.x.y.z
in the Preferences Pane to access it.curl https://testing.local
will fail withcurl: (35) OpenSSL/3.0.14: error:16000069:STORE routines::unregistered scheme
.Steps To Reproduce
Steps to reproduce the behavior:
nix-shell
witha.b.c.d
(it doesn't matter what it is)foo.bar
resolves toa.b.c.d
curl https://testing.local
Expected behavior
There should be no error when running the command.
Screenshots
N/A
Additional context
Interestingly,
curl https://a.b.c.d
works as expected.This seems to be a certificate issue: bypassing SSL certificate verification with
-k
fixes the issue. I am using a custom SSL certificate, but I'm not sure how to point NIX to it.After some digging, I found that this has been brought up before: #283793
Notify maintainers
@lovek323
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: