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

-k/--insecure does not affect DNS resolution #30

Open
ainar-g opened this issue Aug 1, 2024 · 0 comments
Open

-k/--insecure does not affect DNS resolution #30

ainar-g opened this issue Aug 1, 2024 · 0 comments

Comments

@ainar-g
Copy link

ainar-g commented Aug 1, 2024

  • The command (edited for privacy):

    gocurl --dns-servers 'tls://dns.localhost' -k -v 'https://web.localhost/'

    (Both addresses are set to be 127.0.0.1 through /etc/hosts.)

  • Expected: A successful query despite the local certificate being self-signed.

  • Actual:

    Connecting to web.localhost:443
    Connecting to tcp://web.localhost:443
    Resolving IP addresses of dns.localhost
    Failed to make request: empty response
    dns lookup: getting conn to tls://dns.localhost:443: connecting to dns.localhost: tls: failed to verify certificate: x509: certificate signed by unknown authority
    dns lookup: getting conn to tls://dns.localhost:443: connecting to dns.localhost: tls: failed to verify certificate: x509: certificate signed by unknown authority
    
  • Proposed solution: curl has a separate --doh-insecure flag. Perhaps either use that or add a new flag like --dns-insecure to disable TLS verification for all DNS queries.

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

1 participant