mirror of
https://github.com/ruby/ruby.git
synced 2026-08-11 08:13:34 +08:00
Create spec/bundler/fetcher/gem_remote_fetcher_local_ssl_server_spec.rb
adding non-PQC and PQC server/client connection integration tests.
As "Bundler::Fetcher local SSL server #connection PQC connects with client cert
auth" failed with the following error due to hardcoded `OpenSSL::PKey::RSA.new` in
`Bundler::Fetcher#connection`, fixed it to support ML-DSA ssl_client_cert.
```
$ bin/rspec spec/bundler/fetcher/gem_remote_fetcher_local_ssl_server_spec.rb
...
Failures:
1) Bundler::Fetcher local SSL server #connection PQC connects with client cert auth
Failure/Error: fetcher = Bundler::Fetcher.new(remote)
OpenSSL::PKey::PKeyError:
incorrect pkey type: UNDEF
# /home/jaruga/.local/ruby-4.1.0-debug-3ef48ef9c8-openssl-4.1.0-7194354488/lib/ruby/4.1.0+1/openssl/pkey.rb:394:in 'OpenSSL::PKey::RSA#initialize'
# /home/jaruga/.local/ruby-4.1.0-debug-3ef48ef9c8-openssl-4.1.0-7194354488/lib/ruby/4.1.0+1/openssl/pkey.rb:394:in 'Class#new'
# /home/jaruga/.local/ruby-4.1.0-debug-3ef48ef9c8-openssl-4.1.0-7194354488/lib/ruby/4.1.0+1/openssl/pkey.rb:394:in 'OpenSSL::PKey::RSA.new'
# ./bundler/lib/bundler/fetcher.rb:321:in 'Bundler::Fetcher#connection'
# ./bundler/lib/bundler/fetcher.rb:140:in 'Bundler::Fetcher#initialize'
# ./spec/bundler/fetcher/gem_remote_fetcher_local_ssl_server_spec.rb:69:in 'RSpec::ExampleGroups::BundlerFetcherLocalSSLServer#fetch_path'
# ./spec/bundler/fetcher/gem_remote_fetcher_local_ssl_server_spec.rb:60:in 'block (4 levels) in <top (required)>'
...
```
Create test/rubygems/local_ssl_server_utilities.rb to manage utility methods
called by RubyGems test-unit and Bundler rspec tests.
Assisted-by: Claude:claude-opus-4-6[1m]
https://github.com/ruby/rubygems/commit/6aea5fcc17