Skip to content

Commit

Permalink
Windows Ruby 3.3: Workaround: Set OPENSSL_MODULES to find providers.
Browse files Browse the repository at this point in the history
This commit is a workaround to avoid the following test failures by loading
legacy provider.

```
2) Error: test_openssl_legacy_provider(OpenSSL::TestProvider): OpenSSL::Provider::ProviderError: Failed to load legacy provider: (null) (name=legacy)
D:/a/ruby-openssl/ruby-openssl/test/openssl/test_provider.rb:62:in `load'
D:/a/ruby-openssl/ruby-openssl/test/openssl/test_provider.rb:62:in `<main>'
D:/a/ruby-openssl/ruby-openssl/test/openssl/test_provider.rb:61:in `with_openssl'
D:/a/ruby-openssl/ruby-openssl/test/openssl/test_provider.rb:36:in `test_openssl_legacy_provider'
     33:   end
     34:
     35:   def test_openssl_legacy_provider
  => 36:     with_openssl(<<-'end;')
     37:       OpenSSL::Provider.load("legacy")
     38:       algo = "RC4"
     39:       data = "a" * 1000
```
  • Loading branch information
junaruga committed Jan 11, 2024
1 parent 1fa9fc5 commit 7aed35a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ jobs:
if: ${{ !matrix.skip-warnings }}

# Enable provider search path for OpenSSL 3.0 in MSYS2.
# Remove when Ruby 3.2 build is updated
# Remove when Ruby 3.2, and 3.3 builds are updated.
- name: enable windows provider search path
run: echo "OPENSSL_MODULES=$($env:RI_DEVKIT)\$($env:MSYSTEM_PREFIX)\lib\ossl-modules" >> $env:GITHUB_ENV
if: runner.os == 'Windows' && matrix.ruby == '3.2'
if: runner.os == 'Windows' && (matrix.ruby == '3.2' || matrix.ruby == '3.3')

- name: compile
run: rake compile
Expand Down

0 comments on commit 7aed35a

Please sign in to comment.