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
Can't connect to Fiddler proxy if using WinSSL backend #264
Comments
FWIW, typically "SCH_CRED_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT" is used by most things in Windows, as revocation checking the root itself isn't very useful (roots get revoked by WindowsUpdates, not by CRL/OCSP). Fiddler's CertMaker Addon has a preference (set fiddler.certmaker.bc.AddCRL to true) that allows you to point it at a CRL (the fiddler.certmaker.bc.CRLURL preference points to the garbage "http://www.fiddler2.com/revocationlist.crl" by default), but note that this will only add a CRL reference to the EE certificates, not the root. |
If I use one of the other mutually exclusive flags like |
I would advise to keep the default as is, meaning |
Marc unfortunately using those options is not going to solve this problem. If HTTPS intercept is enabled then by default there's no revocation resource, and even if the revocation resource is enabled it's fake and only for the server certificate. As Eric noted the resource location can be changed, but I don't think most users will go to the trouble of setting up fake replies (assuming that's possible here). Assume that in the best case revocation checking will fail unless we ignore offline servers which is kind of defeating the point if you ask me. I see two possibles, either we document the workaround (allow insecure connections) or add an option to disable revocation entirely. I could implement it for schannel and maybe others here could one day extend it to other SSL backends where revocation checking is enabled by default? |
A couple things-- To Marc's point: As far as I know, Windows itself uses SCH_CRED_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT in most places, as roots are customarily revoked via other means, and checking the root entails a performance cost that just doesn't make sense. Now, to Jay's point "ignore offline servers which is kind of defeating the point if you ask me"-- that's partially true, and what led Chrome to remove revocation checks from Chrome. In IE, revocation offline failures are silent (http://blogs.msdn.com/b/ieinternals/archive/2011/04/07/enabling-certificate-revocation-check-failure-warnings-in-internet-explorer.aspx) I argue that there are scenarios where revocation checks still have value (e.g. misissuance, as in the case of a phishing attack) even when silent in the case of CRL offline (which an active MITM could obviously simulate). On Fiddler's side of things, there's the option to specify a revocation URL (and I can have this add that URL to the root as well as the EE). I will have a look at having this generate a fake CRL as well, but that may indeed prove more complex than is worthwhile for this case. I will note that Fiddler has been used by millions of Windows users for over a decade and this is the first time I'm aware of where a CRL-offline check has been a blocking issue. So, kudos for that I guess. :-) |
Ping... any watchers have an opinion about this? I could go either way. |
@jay When you say "disable revocation entirely" do you mean "set SCH_CRED_IGNORE_NO_REVOCATION_CHECK | SCH_CRED_IGNORE_REVOCATION_OFFLINE like most Windows callers"? That's different than disabling entirely... |
I think the only valid way to go is to set |
@ericlaw1979 help me out here because I thought that's what we'd want to do. Basically we'd stop passing
@mback2k Agree. I will get in before the feature window closes. I'll change the default to |
While having an option to disable revocation checking entirely may be useful (for performance reasons), disabling revocation checking entirely would not match the behavior of the majority of components on a Windows system. The majority of components on a Windows system either use WinINET or respect its behavior here-- namely, they perform a revocation check but they ignore offline revocation servers or missing revocation URLs; it becomes a "best-effort" type of thing whereby if a responder is available it is checked and if it returns "revoked" then the connection is blocked. Some people have called this a "seatbelt that breaks in a wreck" but that's a bit misleading-- "best effort" revocation checks are useful for certain scenarios (e.g. phishing sites like "BankOfTheVVest.com") even while it's true that such an effort would fail in the presence of an active MITM. |
New tool option --ssl-no-revoke. New value CURLSSLOPT_NO_REVOKE for CURLOPT_SSL_OPTIONS. Currently this option applies only to WinSSL where we have automatic certificate revocation checking by default. According to the ssl-compared chart there are other backends that have automatic checking (NSS, wolfSSL and DarwinSSL) so we could possibly accommodate them at some later point. Bug: #264 Reported-by: zenden2k <zenden2k@gmail.com>
I've added an option to disable revocation checking for WinSSL in 172b2be. New tool option The commit may be seen as a departure from some of the comments I made earlier. Specifically I've eschewed some talked about changes. Now:
If anyone wants to revisit either of those my suggestion would be exposing a callback, preferably if possible like the schannel equivalent of a CTX function the way we do for OpenSSL so a libcurl user would have some way to make more detailed changes on their own. @zenden2k thanks for your report. @ericlaw1979 @mback2k thanks for your help and feedback. |
New tool option --ssl-no-revoke. New value CURLSSLOPT_NO_REVOKE for CURLOPT_SSL_OPTIONS. Currently this option applies only to WinSSL where we have automatic certificate revocation checking by default. According to the ssl-compared chart there are other backends that have automatic checking (NSS, wolfSSL and DarwinSSL) so we could possibly accommodate them at some later point. Bug: curl#264 Reported-by: zenden2k <zenden2k@gmail.com>
zenden2k reported curl with WinSSL backend can't connect to Fiddler proxy if HTTPS intercept is enabled.
schannel is returning
CRYPT_E_NO_REVOCATION_CHECK
likely because we passSCH_CRED_REVOCATION_CHECK_CHAIN
inschannel_connect_step1
and in that case schannel requires all root CAs to have some sort of revocation detail when that flag is passed. Fiddler doesn't, so it fails? @ericlaw1979Assuming that's the case it should be sufficient to advise in the FAQ or wiki or somewhere that if curl with WinSSL backend is used to connect to a Fiddler proxy with HTTPS intercept enabled that the
-k
option should be passed to curl so it does not attempt to verify Fiddler's certificate. A caution could be added to only do that if the Fiddler proxy is on localhost and only if HTTPS intercept is enabled.Another way to go would be offer a way to disable revocation checking for WinSSL and advise Fiddler users pass that switch.
Thoughts?
The text was updated successfully, but these errors were encountered: