-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Wrong X509 chain selected when we have multiple viable options #59584
Comments
Tagging subscribers to this area: @bartonjs, @vcsjones, @krwq, @GrabYourPitchforks Issue DetailsDescriptionLet's Encrypt root certificate is expiring soon: We run into a problem where we load a certificate that is signed by The Reproducing code
The certificate in question is: Problem descriptionWhile the PEM file is properly signed by
If I change the date to one month in the future, after the 24/10/2021 0:00:00CN=*.ravenclustertest2ppekrolwork.development.run
|
Since you mentioned Which .NET / .NET Core version are you using, and do you know which version of OpenSSL is present on the system exhibiting this behavior? I ask because this is an upstream issue for OpenSSL 1.0.2 or earlier: https://www.openssl.org/blog/blog/2021/09/13/LetsEncryptRootCertExpire |
I'll get the exact version of OpenSSL shortly. We are running both .NET 3.1 and .NET 5.0. Note that this is also happening on Windows, where we are seeing the impact by removing: That is the Let's Encrypt R3. |
Verified that this happened on OpenSSL 1.1.1 as well |
Okay, I think that I understand a little better what is going on now. Consider the following below, which loads the certificate and holds it in memory. In both cases, however, we'll get the old certificate: For the first call, this is valid. But for the second, that is no longer the case. What I believe is happening in our scenario is that we start a Kestrel instance with the certificate at a time when the However, a Does it make sense from your perspective? For reference, this is what I'm getting, which is wrong.
However, the actual PFX file is setup with the Is there a way to affect what chain will be sent back from the server in this case? |
I have a few thoughts here... These issues seem related or this duplicates. There is some additional information in those issues, but on the Windows side, it looks like some things get cached and that results in re-using the expired chain.
@wfurt may know from #37933 and if or how this is plumbed in Kerstrel. |
AFAIK the chain construction is out of our hands on Windows and there is no way how to pick exactly what to send. The best we could do is to make certificates available to CAPI and Schannel. |
Since it sounds like this is mainly about chains that were being served out of a TLS server instance, closing as duplicate of #43879. |
Description
Let's Encrypt root certificate is expiring soon:
DST Root CA X3
.We run into a problem where we load a certificate that is signed by
ISRG Root X1
, but when loading the PEM (and when calling Export), will be marked as signed by the soon to be expiredDST Root CA X3
.The
ca-certificates
package has already removed the trust in this certificate, and that lead to generation of invalid certificates for theX509Certificate2
API.Reproducing code
The certificate in question is:
t.pem.txt
Problem description
While the PEM file is properly signed by
ISRG Root X1
, this will output:If I change the date to one month in the future, after the
DST Root CA X3
is already expired, it will output:24/10/2021 0:00:00
CN=*.ravenclustertest2ppekrolwork.development.run
CN=R3, O=Let's Encrypt, C=US
CN=ISRG Root X1, O=Internet Security Research Group, C=US
The text was updated successfully, but these errors were encountered: