Skip to content

Skip SSL key log test for OpenSSL 3.5+ #116474

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

Merged

Conversation

rokonec
Copy link
Member

@rokonec rokonec commented Jun 10, 2025

Context

OpenSSL 3.5.0 supports SSLKEYLOGFILE with just an environment variable, which is less strict than .NET's requirements. There's no way to check if this feature is enabled in the OpenSSL library, so we should disable the test based on the OpenSSL version for now.

Affected tests

System.Net.Security.Tests.SslStreamRemoteExecutorTests.SslKeyLogFile_IsCreatedAndFilled

Testing

Fix verified on previously stable failing CentOS 10 docker image mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream-10-helix-amd64

Notes

#116473 has been create to revisit it in future, lets say a year

@rokonec rokonec self-assigned this Jun 10, 2025
@Copilot Copilot AI review requested due to automatic review settings June 10, 2025 12:03
@rokonec rokonec added area-System.Net.Security test-bug Problem in test source code (most likely) failing-test labels Jun 10, 2025
@rokonec rokonec requested review from ManickaP and removed request for Copilot June 10, 2025 12:03
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR skips the SSL key log file creation test when running against OpenSSL 3.5 or later, addressing false failures due to the library’s relaxed behavior.

  • Updated SslStreamRemoteExecutorTests to bypass the test for OpenSSL versions 3.5+
  • Added inline comments referencing the change and future revisit via issue #116473
Comments suppressed due to low confidence (1)

src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamRemoteExecutorTests.cs:37

  • Consider using an explicit test skip attribute or helper instead of an early return to indicate that the test is intentionally skipped for OpenSSL 3.5+ scenarios. This approach can improve clarity in test reports and maintain consistency with other skipped tests.
if (PlatformDetection.IsOpenSslSupported && PlatformDetection.OpenSslVersion >= new Version(3, 5, 0))

@rokonec rokonec requested a review from rzikm June 10, 2025 12:03
Copy link
Contributor

Tagging subscribers to this area: @dotnet/ncl, @bartonjs, @vcsjones
See info in area-owners.md if you want to be subscribed.

@rokonec rokonec removed the request for review from ManickaP June 10, 2025 12:04
Copy link
Member

@rzikm rzikm left a comment

Choose a reason for hiding this comment

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

LGTM

@rokonec rokonec merged commit 179473d into dotnet:main Jun 16, 2025
84 of 86 checks passed
@rokonec rokonec deleted the dev/rokonec/cond-disable-ssl-keylogger-test branch June 16, 2025 08:41
@rokonec
Copy link
Member Author

rokonec commented Jun 16, 2025

/backport to release/9.0-staging

Copy link
Contributor

Started backporting to release/9.0-staging: https://github.com/dotnet/runtime/actions/runs/15679821163

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Net.Security failing-test test-bug Problem in test source code (most likely)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants