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

net/http.rb - fixup session timeout logic for OpenSSL 3 #165

Closed
wants to merge 2 commits into from

Conversation

MSP-Greg
Copy link
Contributor

In OpenSSL 3, session.timeout may not allow negative values, although context.timeout can be negative. For more info see ruby/openssl#703.

Since the code here is using session.timeout in a non-standard way, use context.timeout. If it's nil, use session.timeout. This allows the code to work with OpenSSL 3.2.0.

@MSP-Greg
Copy link
Contributor Author

I tested this locally without the two commits affecting the test.

In addition to this PR, commits 042faf7 & 58fc559 should be reverted, and PR #163 should be merged, which adds WIndows CI.

At present, the only simple way to test against OpenSSL 3.2.0 is to use a Windows Ruby master build, either head or ucrt.

@MSP-Greg
Copy link
Contributor Author

I just rebased and additionally:
a) added Windows CI
b) removed the 'omit' in test_session_reuse_but_expire.

The branch is at https://github.com/MSP-Greg/net-http/commits/00-timeout-windows/, and CI passed.

Windows Ruby head builds all use OpenSSL 3.2.1, Ruby 3.2 and 3.3 are using OpenSSL 3.2.0.

@MSP-Greg
Copy link
Contributor Author

Closing, see #178

@MSP-Greg MSP-Greg closed this Jul 11, 2024
@MSP-Greg MSP-Greg deleted the 00-timeout branch July 11, 2024 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant