Repository navigation
Replies: 7 comments 16 replies
|
Hi @chengr28, with LibreSSL, curl 8.23.0 imports certificates from the Windows ROOT and CA stores into LibreSSL's own verifier. It doesn't consult the Windows Disallowed store or delegate verification to Windows' certificate chain engine. Adding Schannel uses Windows' native verification and honors its custom certificate security rules. It also performs CRL checks by default, as described in curl's certificate-verification documentation. For enforcing the Windows distrust settings you've configured, the Schannel build you already tested is the appropriate choice. No additional flag is needed to enable that behavior in your command. If you need to stay with LibreSSL, --crlfile lets you supply issuer CRLs in PEM format. You'd need to obtain and maintain those CRLs separately; adding certificates to Windows' Untrusted Certificates list doesn't create CRL entries or make that list available to LibreSSL. |
|
This doesn't seem LibreSSL-specific, but applies to all OpenSSL/fork Till there is support implemented for an automated negative list, Another fix/workaround is to point such builds to a manual CA bundle, As for using Schannel, its TLS capabilities and security properties may |
|
Hi benitoalba and vszakats, Thanks for you help, then I will try to generate CRL or CA bundle for future test, till automatic revocation loading is ready. However, in the past two days I found the way of removing CA from system is not working in Windows. It seems MS only revoked the intermediate certificates rather than CAs, they are still in trusted list at this time. The system will keep trust these CAs until I adding them to system untrusted list, even I delete them from all of two trusted lists ( Before doing new test, I have deleted all emSign... root certificates. At this stage, cURL rejected the connection (below the first quote). After that, I just opened the CA pem/crt file in Explorer (as I see, may include apps using SChannel or browsers connect to a website which contains the CA), suddenly the CA was "back" to trusted list. Now cURL loaded them from system and passed the certificate check (below the second quote). This link said Windows will download and store CTL to registry automatically. It looks like when system "meets" certificates, it will check, then if that certificate is in registry CTL it will ADD it to trusted lists. This behavior breaks removing operations. I think that the only way to stop connecting is negative list, not only CRL but also loading revocation list from system. |
|
I've read this thread and I think you have a point. I'll add that in Windows there is a big difference between blocking and removing a root certificate. If a root certificate is removed in Windows and it is still trusted by Microsoft then Windows can tell it's missing from the root store and can re-import it the next time it sees it as an issuer. It takes place near instantaneously. Simply viewing a certificate can cause it. I assume it's using the Windows Update mechanism? but I tried it on an EOL Windows 8.1 device with the AAA root and saw the same thing: Delete AAA, simply view the certificate and it's re-imported by Windows. Yet that same device has not received the banned intermediates. Anyway, even if you add them manually as untrusted as you did here it's not helping which is why I think you have a point. I'm proposing #23599 to address this by banning all the problem certificates. I consider this certificate breach an extraordinary case. What I'm proposing is not as thorough as checking a chain during verification for banned certificates but this is what I can offer with the time I have. |
I strongly recommend blocking by the intermediate SPKI, either raw as we did in rustls/webpki or by the SHA256 digest of the SPKI as was done in BoringSSL and Go. |
|
New official curl Windows binaries 8.23.0_6 with Jay's filtering patch applied |
|
Yes, adding negative list may not a perfect solution. I understand every tools have their focus and most of them which verify by their own only check positive list. However, I think curl for Windows (not including Schannel backend) only checking positive list is not a good process, so I posted this discussion. As I know, different operation system / toolchain has different process to do certificate verification. MS provides Schannel to help programs to do TLS, of cause they perfer developers to use. Curl has lots of TLS backends. It will import Windows's positive list when using OpenSSL/fork TLS backends, but as I see only importing positive list is not enough. Let's see MS's handling about the eMudhra situation: they only add bad intermediate certificates rather than removing / distrusting root certificates. It shows MS treats both positive and negative lists as a mechanism. Unfortunately, curl for Windows ignores the last one, that breaks the certificate verification which is designed by MS and gets this issue. In the past few years, curl for Windows was used a pem file, it's ok, because as I see it follows the traditional practice. Then at some point, it was switched to import Windows ROOT+CA. If curl prefers to use OpenSSL/fork TLS backend in Windows and decided to trust Windows's certificate (use this mechanism), I think we should follow the design and implement the fully check, or delegate the verification process to system (Schannel?). |
Uh oh!
There was an error while loading. Please reload this page.
Hi team,
Just received a security advisory about eMudhra, and then tested cURL for Windows (official build). It seems it won't check any revocations. I have already added listed 16 intermediate certificates to system local machine untrusted list manually before doing the test. Also tried Windows bundle curl, it uses Schannel totally and rejected the connections.
I'm not sure if this is expected behavior (may need some additional parameters?), so make a new discussion first instead of an issue.
Hope below information can help, thank you.
Windows 11 26H2 version 26300.9711
.\curl binary: 8.23.0_3 official build
curl.exe binary: system bundle
All reactions