-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Do not include extensions sequence if no extensions #40944
Conversation
When encoding an X509 certificate, omit the extensions sequence if the effective number of extensions is zero. Per RFC 5280, this sequence is "one or more certificate extensions".
Test failures look unrelated. |
@bartonjs do we need a backport for this to 2.1 and/or 3.1? |
@danmosemsft my 2c: it's a bit of a corner case. It will only occur when doing |
I wouldn't. The test was largely codifying an API (mis)usage and maintaining some corner-case compat. As @vcsjones said while I was writing an equivalent statement: anyone who encounters this can do their own "don't add null to this collection". The nullability annotations for the type say that |
Re: #39603, I can't reproduce it in netcoreapp3.1 or 2.1, only in 5 previews, so there isn't anything to fix in a backport that I've identified. |
OK excellent thanks for the update! |
Will the corefx repo get CI legs for Big Sur? If so, the test that prompted this change will start failing. We can either fix the test or port this if we need to. |
I expect we will switch out a CI leg for Big Sur when it is released. |
Should we preemptively try to address this then? It might make more sense to just change the test to wrap that part of the test in |
I think on 2.1/3.1 we'd just guard the test. |
Fix for macOS Big Sur rejecting X509 certificates that have an empty extension sequence.
Fixes #40939