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
Setting certificate check for HTTP returns error (even if HTTP request redirects to HTTPS) #2904
Comments
Anybody have any ideas about this?? It shouldn't be too hard to put in. |
The issue would have to be a different one. The error comes not from setting the callback, but the fact that we don't check beforehand whether the current stream is encrypted before asking for it. |
That error is correct where it's generated, the issue is calling that function when we do not have connection capable of having a certificate. |
Ah so that's called before the HTTPS redirect. |
yeah, libgit2 checks the scheme before calling that function, without checking the actual connection. I was actually hit by this issue this morning 😔 |
If you try to set the
certificate_check
on the remote callbacks option for agit_clone
when the protocol is HTTP you'll getError: an unencrypted stream does not have a certificate
. And that makes sense but if the HTTP redirects to HTTPS (e.g. GitHub) then you do have a certificate and the check would be nice to have.The text was updated successfully, but these errors were encountered: