Skip to content

Fix dev-certs OpenSSL trust guidance message formatting - #69548

Merged
akoeplinger merged 1 commit into
dotnet:mainfrom
akoeplinger:fix/dev-certs-event-111-message
Sep 28, 2026
Merged

akoeplinger merged 1 commit into
dotnet:mainfrom
akoeplinger:fix/dev-certs-event-111-message

Conversation

@akoeplinger

@akoeplinger akoeplinger commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Description

Fix the format string for dev-certs event 111, which tells Linux users to configure SSL_CERT_DIR when OpenSSL's default certificate directory cannot be determined.

The message references {2}, but the event supplies only two payload values: the certificate directory and the environment variable name. Formatting it throws FormatException instead of displaying the guidance. Use {1} for the environment variable.

Extend the shared EventSourceValidator to check message syntax and placeholder bounds, so existing validation covers this and similar mistakes across events. Add validator-level tests for valid formats, malformed messages, and out-of-range placeholders rather than an event-specific test.

Found while looking at #69534, which restores EventSource support in Native AOT tools.

Validation

  • With the shared validation in place, the existing certificate event-source test fails on the original event 111 message and passes with the correction.
  • All 9 validator tests and the certificate event-source test pass in Release on macOS arm64. The test-helper project also builds across its configured target frameworks.
  • The complete Linux trust workflow was not exercised locally.

Use the second payload argument for the environment variable in event 111. Extend EventSourceValidator to check message format syntax and placeholder bounds, with shared validator coverage instead of an event-specific test.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: ff59a411-cb14-4088-a4a1-9e9c7c4901a4
Copilot AI lite review requested due to automatic review settings September 25, 2026 22:04
@github-actions github-actions Bot added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Sep 25, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Hey @dotnet/aspnet-build, looks like this PR is something you want to take a look at.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

No unresolved blocking issues were identified.

Review effort: Lite
Findings: None

What changed in this PR

Fixes the malformed OpenSSL trust guidance message for dev-certs and adds shared EventSource format validation.

Changes:

  • Corrects event 111’s placeholder.
  • Validates message syntax and placeholder bounds.
  • Adds validator tests for valid and invalid formats.
File Description
src/​Testing/​test/​EventSourceValidatorTests.cs Adds message-format validation tests.
src/​Testing/​src/​Tracing/​EventSourceValidator.cs Validates EventSource message syntax and placeholder ranges.
src/​Shared/​CertificateGeneration/​CertificateManager.cs Fixes event 111 formatting.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@akoeplinger

Copy link
Copy Markdown
Member Author

/ba-g unrelated QUIC test failures

@akoeplinger
akoeplinger merged commit bf676af into dotnet:main Sep 28, 2026
26 of 28 checks passed
@akoeplinger
akoeplinger deleted the fix/dev-certs-event-111-message branch September 28, 2026 17:07
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants