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

no-verify not the same as curl --insecure #315

Open
jedahan opened this issue Jun 2, 2023 · 2 comments
Open

no-verify not the same as curl --insecure #315

jedahan opened this issue Jun 2, 2023 · 2 comments

Comments

@jedahan
Copy link

jedahan commented Jun 2, 2023

when connecting to a self signed cert with an unknown issuer, passing --no-verify still throws this error:

error trying to connect: invalid peer certificate contents: invalid peer certificate: UnknownIssuer

When I run the same command with curl --insecure, it works.

I don't have a great understanding of SSL, so appreciate any insight here.

@blyxxyz
Copy link
Collaborator

blyxxyz commented Jun 2, 2023

The option you need is --verify=no.

This is a nasty gotcha in the way we interpret options. --no-verify means "ignore all --verify options that came before", like --no-session, --no-auth, etcetera. (We inherited this from HTTPie.)


Maybe we should print a warning/suggestion if a TLS error happens and you passed --no-verify without a --verify to cancel out.

@ducaale
Copy link
Owner

ducaale commented Jun 3, 2023

Maybe we should print a warning/suggestion if a TLS error happens and you passed --no-verify without a --verify to cancel out.

Something like this could also be helpful if we add cURL's --noproxy option (disables system proxy), which is too similar to --proxy's negation flag i.e --no-proxy. However, I don't know if we can reliably check the error in this case.

Would it be enough to print a warning as soon we detect a negation flag has no effect and is too similar to another flag?

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

3 participants