Skip to content

Conversation

@rhenium
Copy link
Member

@rhenium rhenium commented Aug 1, 2025

Freeze OpenSSL::SSL::SSLContext::DEFAULT_PARAMS to make it Ractor-shareable.

When called from a non-main Ractor, SSLContext#set_params now prepares a new OpenSSL::X509::Store in Ractor-local storage.


This applies on top of #924. Fixes #521.

Note that you need https://bugs.ruby-lang.org/issues/21109 to use SSLSocket in a non-main Ractor, which will be part of Ruby 3.5.

@rhenium
Copy link
Member Author

rhenium commented Aug 10, 2025

I think these Windows jobs are failing due to https://bugs.ruby-lang.org/issues/21537.

@rhenium rhenium force-pushed the ky/ssl-set-params-ractors branch from c05b300 to 3f3c2e2 Compare October 8, 2025 12:05
@rhenium rhenium changed the base branch from master to maint-3.3 October 8, 2025 14:01
@rhenium rhenium changed the base branch from maint-3.3 to master October 8, 2025 14:01
@rhenium rhenium force-pushed the ky/ssl-set-params-ractors branch from 3f3c2e2 to 7cc1374 Compare October 8, 2025 14:07
Freeze OpenSSL::SSL::SSLContext::DEFAULT_PARAMS so that it becomes
Ractor-shareable.

Also, prepare a new OpenSSL::X509::Store in Ractor-local storage, if
called from a non-main Ractor. OpenSSL::X509::Store currently is not a
shareable object.
@rhenium rhenium force-pushed the ky/ssl-set-params-ractors branch from 7cc1374 to 3d52713 Compare October 8, 2025 14:15
@rhenium rhenium merged commit 82e80ee into ruby:master Oct 8, 2025
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenSSL::SSL::SSLContext::DEFAULT_CERT_STORE is not shareable across ractors

1 participant