Skip to content
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

Change empty subject test certificate to include a critical SAN. #111581

Merged
merged 2 commits into from
Jan 25, 2025

Conversation

vcsjones
Copy link
Member

This test was marked SkipOnPlatform for Android because the test would fail. However, it turns out that Android does support empty subjects in certificates. If the subject is empty, then the SubjectAltName extension must be marked critical. This is in accordance with RFC 5280:

If the subject field contains an empty sequence, then the issuing CA MUST include a subjectAltName extension that is marked as critical.

With a critical SAN extension, this test now passes on all platforms.

Fixes #70196

This test was marked SkipOnPlatform for Android because the test would fail. However,
it turns out that Android does support empty subjects in certificates. If the subject
is empty, then the SubjectAltName extension must be marked critical. This is in accordance
with RFC 5280:

> If the subject field contains an empty sequence, then the issuing CA MUST include a subjectAltName extension that is marked as critical.

With a critical SAN extension, this test now passes on all platforms.
@vcsjones
Copy link
Member Author

/azp run runtime-extra-platforms

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Security test-enhancement Improvements of test source code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

X509Chain.Build() does not allow empty subject name in Xamarin
2 participants