nahi / httpclient

'httpclient' gives something like the functionality of libwww-perl (LWP) in Ruby.
https://github.com/nahi/httpclient
703 stars 290 forks source link

Add GitHub Actions to run CI #456

Closed yahonda closed 4 months ago

yahonda commented 9 months ago

This pull request adds GitHub Actions to run CI.

TODO to address failures/errors

I need any help to take care of these failures/errors above.

yahonda commented 9 months ago

Ruby 3.1 and higher raises OpenSSL related errors

Here are remainng failures and errors they only fail if Ruby versions are 3.1 and higher. I assume they are related to OpenSSL 3 because OpenSSL 3 support is available since Ruby 3.1 and not feasible to backport to 3.0 or older versions of Ruby Refer to https://bugs.ruby-lang.org/issues/18658

$ ruby -v
ruby 3.3.0 (2023-12-25 revision 5124f9ac75) +MN [x86_64-linux]
$ bundle exec ruby test/test_auth.rb 
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rubyntlm-0.6.3/lib/net/ntlm.rb:39: warning: base64 was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add base64 to your Gemfile or gemspec. Also contact author of rubyntlm-0.6.3 to add base64 into its gemspec.
Loaded suite test/test_auth
Started
E
=============================================================================================================================================================================================================================================
Error: test_negotiate_and_basic(TestAuth): OpenSSL::Digest::DigestError: Digest initialization failed: initialization error
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/openssl/digest.rb:31:in `initialize'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/openssl/digest.rb:31:in `block (3 levels) in <class:Digest>'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/openssl/digest.rb:37:in `new'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/openssl/digest.rb:37:in `block (3 levels) in <class:Digest>'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rubyntlm-0.6.3/lib/net/ntlm.rb:149:in `ntlm_hash'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rubyntlm-0.6.3/lib/net/ntlm.rb:162:in `ntlmv2_hash'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rubyntlm-0.6.3/lib/net/ntlm/message/type2.rb:73:in `response'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/auth.rb:563:in `block in get'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/mutex_m.rb:77:in `synchronize'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/mutex_m.rb:77:in `mu_synchronize'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/auth.rb:537:in `get'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/auth.rb:97:in `block in filter_request'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/auth.rb:95:in `each'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/auth.rb:95:in `filter_request'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1235:in `block in do_get_block'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1234:in `each'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1234:in `do_get_block'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1023:in `block in do_request'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1137:in `protect_keep_alive_disconnected'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1018:in `do_request'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:860:in `request'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:743:in `get'
test/test_auth.rb:481:in `test_negotiate_and_basic'
     478:     c.debug_dev = str = ''
     479:     c.set_auth('http://www.example.org/', 'admin', 'admin')
     480:     # Do NTLM negotiation
  => 481:     c.get('http://www.example.org/foo')
     482:     # BasicAuth authenticator should not respond to it because NTLM
     483:     # negotiation has been finished.
     484:     assert_match(%r(Authorization: NTLM), str)
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_ntlm_auth(TestAuth): OpenSSL::Digest::DigestError: Digest initialization failed: initialization error
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/openssl/digest.rb:31:in `initialize'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/openssl/digest.rb:31:in `block (3 levels) in <class:Digest>'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/openssl/digest.rb:37:in `new'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/openssl/digest.rb:37:in `block (3 levels) in <class:Digest>'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rubyntlm-0.6.3/lib/net/ntlm.rb:149:in `ntlm_hash'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rubyntlm-0.6.3/lib/net/ntlm.rb:162:in `ntlmv2_hash'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rubyntlm-0.6.3/lib/net/ntlm/message/type2.rb:73:in `response'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/auth.rb:563:in `block in get'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/mutex_m.rb:77:in `synchronize'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/mutex_m.rb:77:in `mu_synchronize'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/auth.rb:537:in `get'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/auth.rb:97:in `block in filter_request'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/auth.rb:95:in `each'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/auth.rb:95:in `filter_request'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1235:in `block in do_get_block'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1234:in `each'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1234:in `do_get_block'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1023:in `block in do_request'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1137:in `protect_keep_alive_disconnected'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1018:in `do_request'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1108:in `follow_redirect'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:655:in `get_content'
test/test_auth.rb:136:in `test_ntlm_auth'
     133:   def test_ntlm_auth
     134:     c = HTTPClient.new
     135:     c.set_auth("http://localhost:#{serverport}/ntlm_auth", 'admin', 'admin')
  => 136:     assert_equal('ntlm_auth OK', c.get_content("http://localhost:#{serverport}/ntlm_auth"))
     137:   end
     138: 
     139:   def test_basic_auth
=============================================================================================================================================================================================================================================
Finished in 0.305729555 seconds.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
27 tests, 62 assertions, 0 failures, 2 errors, 0 pendings, 0 omissions, 0 notifications
92.5926% passed
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
88.31 tests/s, 202.79 assertions/s
$
$ bundle exec ruby test/test_ssl.rb 
Loaded suite test/test_ssl
Started
F
=============================================================================================================================================================================================================================================
Failure: test_allow_tlsv1(TestSSL):
  Exception raised:
  HTTPClient::ConnectTimeoutError(<execution expired>)
  /home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:103:in `connect'
  /home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:103:in `ssl_connect'
  /home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:41:in `initialize'
  /home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:26:in `new'
  /home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:26:in `create_socket'
  /home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:752:in `block in connect'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/timeout.rb:186:in `block in timeout'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/timeout.rb:193:in `timeout'
  /home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:748:in `connect'
  /home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:511:in `query'
  /home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:177:in `query'
  /home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1246:in `do_get_block'
  /home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1023:in `block in do_request'
  /home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1137:in `protect_keep_alive_disconnected'
  /home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1018:in `do_request'
  /home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:860:in `request'
  /home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:743:in `get'
  test/test_ssl.rb:265:in `block in test_allow_tlsv1'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/assertions.rb:693:in `block in assert_nothing_raised'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/assertions.rb:1918:in `_wrap_assertion'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/assertions.rb:684:in `assert_nothing_raised'
  test/test_ssl.rb:263:in `test_allow_tlsv1'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/testcase.rb:871:in `run_test'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/testcase.rb:566:in `block (2 levels) in run'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/fixture.rb:276:in `block in create_fixtures_runner'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/fixture.rb:276:in `block in create_fixtures_runner'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/fixture.rb:257:in `run_fixture'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/fixture.rb:292:in `run_setup'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/testcase.rb:564:in `block in run'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/testcase.rb:563:in `catch'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/testcase.rb:563:in `run'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/testsuite.rb:124:in `run_test'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/testsuite.rb:53:in `run'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/testsuite.rb:124:in `run_test'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/testsuite.rb:53:in `run'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/ui/testrunnermediator.rb:67:in `run_suite'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/ui/testrunnermediator.rb:45:in `block (2 levels) in run'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/ui/testrunnermediator.rb:102:in `with_listener'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/ui/testrunnermediator.rb:41:in `block in run'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/ui/testrunnermediator.rb:39:in `catch'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/ui/testrunnermediator.rb:39:in `run'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/ui/testrunner.rb:40:in `start_mediator'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/ui/testrunner.rb:25:in `start'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/ui/testrunnerutilities.rb:24:in `run'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/autorunner.rb:458:in `block in run'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/autorunner.rb:514:in `change_work_directory'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/autorunner.rb:457:in `run'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/autorunner.rb:66:in `run'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit.rb:518:in `block (2 levels) in <top (required)>'
test/test_ssl.rb:263:in `test_allow_tlsv1'
     260:   def test_allow_tlsv1
     261:     teardown_server
     262:     setup_server_with_ssl_version(:TLSv1)
  => 263:     assert_nothing_raised do
     264:       @client.ssl_config.verify_mode = nil
     265:       @client.get("https://localhost:#{serverport}/hello")
     266:     end
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_cert_store(TestSSL): HTTPClient::ConnectTimeoutError: execution expired
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:103:in `connect'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:103:in `ssl_connect'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:41:in `initialize'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:26:in `new'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:26:in `create_socket'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:752:in `block in connect'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/timeout.rb:186:in `block in timeout'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/timeout.rb:193:in `timeout'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:748:in `connect'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:511:in `query'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:177:in `query'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1246:in `do_get_block'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1023:in `block in do_request'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1137:in `protect_keep_alive_disconnected'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1018:in `do_request'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:860:in `request'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:743:in `get'
test/test_ssl.rb:172:in `test_cert_store'
     169:     cfg = @client.ssl_config
     170:     cfg.cert_store.add_cert(cert('ca.cert'))
     171:     begin
  => 172:       @client.get(@url)
     173:       assert(false)
     174:     rescue OpenSSL::SSL::SSLError => ssle
     175:       assert_match(/(certificate verify failed|unable to find valid certification path to requested target)/, ssle.message)
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_ciphers(TestSSL): OpenSSL::SSL::SSLError: SSL_CTX_use_certificate: ee key too small
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:137:in `initialize'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:137:in `new'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:137:in `create_openssl_socket'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:39:in `initialize'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:26:in `new'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:26:in `create_socket'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:752:in `block in connect'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/timeout.rb:186:in `block in timeout'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/timeout.rb:193:in `timeout'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:748:in `connect'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:511:in `query'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:177:in `query'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1246:in `do_get_block'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1023:in `block in do_request'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1137:in `protect_keep_alive_disconnected'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1018:in `do_request'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1108:in `follow_redirect'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:655:in `get_content'
test/test_ssl.rb:221:in `test_ciphers'
     218:     cfg.add_trust_ca(path('ca.cert'))
     219:     cfg.add_trust_ca(path('subca.cert'))
     220:     cfg.timeout = 123
  => 221:     assert_equal("hello", @client.get_content(@url))
     222:     #
     223:     cfg.ciphers = "!ALL"
     224:     begin
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_debug_dev(TestSSL): OpenSSL::SSL::SSLError: SSL_CTX_use_certificate: ee key too small
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:137:in `initialize'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:137:in `new'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:137:in `create_openssl_socket'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:39:in `initialize'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:26:in `new'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:26:in `create_socket'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:752:in `block in connect'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/timeout.rb:186:in `block in timeout'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/timeout.rb:193:in `timeout'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:748:in `connect'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:511:in `query'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:177:in `query'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1246:in `do_get_block'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1023:in `block in do_request'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1137:in `protect_keep_alive_disconnected'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1018:in `do_request'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1108:in `follow_redirect'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:655:in `get_content'
test/test_ssl.rb:80:in `test_debug_dev'
     77:     cfg.client_key = path("client.key")
     78:     cfg.add_trust_ca(path('ca.cert'))
     79:     cfg.add_trust_ca(path('subca.cert'))
  => 80:     assert_equal("hello", @client.get_content(@url))
     81:     assert(str.scan(/^hello$/)[0])
     82:   end
     83: 
=============================================================================================================================================================================================================================================
O
=============================================================================================================================================================================================================================================
Omission: TODO: SSLv3 is not supported in many environments. re-enable when disable TLSv1 [test_no_sslv3(TestSSL)]
test/test_ssl.rb:251:in `test_no_sslv3'
=============================================================================================================================================================================================================================================
F
=============================================================================================================================================================================================================================================
Failure: test_post_connection_check(TestSSL):
  Exception raised:
  HTTPClient::ConnectTimeoutError(<execution expired>)
  /home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:103:in `connect'
  /home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:103:in `ssl_connect'
  /home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:41:in `initialize'
  /home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:26:in `new'
  /home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:26:in `create_socket'
  /home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:752:in `block in connect'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/timeout.rb:186:in `block in timeout'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/timeout.rb:193:in `timeout'
  /home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:748:in `connect'
  /home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:511:in `query'
  /home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:177:in `query'
  /home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1246:in `do_get_block'
  /home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1023:in `block in do_request'
  /home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1137:in `protect_keep_alive_disconnected'
  /home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1018:in `do_request'
  /home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:860:in `request'
  /home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:743:in `get'
  test/test_ssl.rb:354:in `block in test_post_connection_check'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/assertions.rb:693:in `block in assert_nothing_raised'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/assertions.rb:1918:in `_wrap_assertion'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/assertions.rb:684:in `assert_nothing_raised'
  test/test_ssl.rb:353:in `test_post_connection_check'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/testcase.rb:871:in `run_test'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/testcase.rb:566:in `block (2 levels) in run'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/fixture.rb:276:in `block in create_fixtures_runner'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/fixture.rb:276:in `block in create_fixtures_runner'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/fixture.rb:257:in `run_fixture'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/fixture.rb:292:in `run_setup'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/testcase.rb:564:in `block in run'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/testcase.rb:563:in `catch'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/testcase.rb:563:in `run'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/testsuite.rb:124:in `run_test'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/testsuite.rb:53:in `run'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/testsuite.rb:124:in `run_test'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/testsuite.rb:53:in `run'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/ui/testrunnermediator.rb:67:in `run_suite'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/ui/testrunnermediator.rb:45:in `block (2 levels) in run'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/ui/testrunnermediator.rb:102:in `with_listener'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/ui/testrunnermediator.rb:41:in `block in run'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/ui/testrunnermediator.rb:39:in `catch'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/ui/testrunnermediator.rb:39:in `run'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/ui/testrunner.rb:40:in `start_mediator'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/ui/testrunner.rb:25:in `start'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/ui/testrunnerutilities.rb:24:in `run'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/autorunner.rb:458:in `block in run'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/autorunner.rb:514:in `change_work_directory'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/autorunner.rb:457:in `run'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/autorunner.rb:66:in `run'
  /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit.rb:518:in `block (2 levels) in <top (required)>'
test/test_ssl.rb:353:in `test_post_connection_check'
     350:     file = Tempfile.new('cert')
     351:     File.write(file.path, VERIFY_TEST_CERT_LOCALHOST.to_pem)
     352:     @client.ssl_config.add_trust_ca(file.path)
  => 353:     assert_nothing_raised do
     354:       @client.get("https://localhost:#{serverport}/hello")
     355:     end
     356:     @client.ssl_config.verify_mode = OpenSSL::SSL::VERIFY_NONE
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_proxy_ssl(TestSSL): OpenSSL::SSL::SSLError: SSL_CTX_use_certificate: ee key too small
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:137:in `initialize'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:137:in `new'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:137:in `create_openssl_socket'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:39:in `initialize'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:26:in `new'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:26:in `create_socket'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:752:in `block in connect'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/timeout.rb:186:in `block in timeout'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/timeout.rb:193:in `timeout'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:748:in `connect'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:511:in `query'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:177:in `query'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1246:in `do_get_block'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1023:in `block in do_request'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1137:in `protect_keep_alive_disconnected'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1018:in `do_request'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:860:in `request'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:743:in `get'
test/test_ssl.rb:36:in `block in test_proxy_ssl'
     33:       @client.ssl_config.add_trust_ca(path('ca.cert'))
     34:       @client.ssl_config.add_trust_ca(path('subca.cert'))
     35:       @client.debug_dev = str = ""
  => 36:       assert_equal(200, @client.get(@url).status)
     37:       assert(/accept/ =~ @proxyio.string, 'proxy is not used')
     38:       assert(/Host: localhost:#{serverport}/ =~ str)
     39:     end
/home/yahonda/src/github.com/nahi/httpclient/test/helper.rb:58:in `escape_noproxy'
test/test_ssl.rb:30:in `test_proxy_ssl'
=============================================================================================================================================================================================================================================
F
=============================================================================================================================================================================================================================================
Failure: test_set_default_paths(TestSSL)
test/test_ssl.rb:240:in `test_set_default_paths'
     237: end
     238: 
     239:   def test_set_default_paths
  => 240:     assert_raise(OpenSSL::SSL::SSLError) do
     241:       @client.get(@url)
     242:     end
     243:     escape_env do

<OpenSSL::SSL::SSLError> expected but was
<HTTPClient::ConnectTimeoutError(<execution expired>)
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:103:in `connect'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:103:in `ssl_connect'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:41:in `initialize'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:26:in `new'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:26:in `create_socket'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:752:in `block in connect'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/timeout.rb:186:in `block in timeout'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/timeout.rb:193:in `timeout'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:748:in `connect'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:511:in `query'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:177:in `query'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1246:in `do_get_block'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1023:in `block in do_request'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1137:in `protect_keep_alive_disconnected'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1018:in `do_request'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:860:in `request'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:743:in `get'
test/test_ssl.rb:241:in `block in test_set_default_paths'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/assertions.rb:1961:in `block (2 levels) in _assert_raise'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/assertions.rb:55:in `block in assert_block'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/assertions.rb:1913:in `_wrap_assertion'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/assertions.rb:54:in `assert_block'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/assertions.rb:1959:in `block in _assert_raise'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/assertions.rb:1918:in `_wrap_assertion'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/assertions.rb:1945:in `_assert_raise'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/assertions.rb:287:in `assert_raise'
test/test_ssl.rb:240:in `test_set_default_paths'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/testcase.rb:871:in `run_test'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/testcase.rb:566:in `block (2 levels) in run'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/fixture.rb:276:in `block in create_fixtures_runner'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/fixture.rb:276:in `block in create_fixtures_runner'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/fixture.rb:257:in `run_fixture'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/fixture.rb:292:in `run_setup'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/testcase.rb:564:in `block in run'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/testcase.rb:563:in `catch'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/testcase.rb:563:in `run'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/testsuite.rb:124:in `run_test'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/testsuite.rb:53:in `run'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/testsuite.rb:124:in `run_test'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/testsuite.rb:53:in `run'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/ui/testrunnermediator.rb:67:in `run_suite'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/ui/testrunnermediator.rb:45:in `block (2 levels) in run'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/ui/testrunnermediator.rb:102:in `with_listener'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/ui/testrunnermediator.rb:41:in `block in run'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/ui/testrunnermediator.rb:39:in `catch'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/ui/testrunnermediator.rb:39:in `run'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/ui/testrunner.rb:40:in `start_mediator'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/ui/testrunner.rb:25:in `start'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/ui/testrunnerutilities.rb:24:in `run'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/autorunner.rb:458:in `block in run'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/autorunner.rb:514:in `change_work_directory'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/autorunner.rb:457:in `run'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit/autorunner.rb:66:in `run'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/test-unit-3.6.1/lib/test/unit.rb:518:in `block (2 levels) in <top (required)>'
>
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_sync(TestSSL): OpenSSL::SSL::SSLError: SSL_CTX_use_certificate: ee key too small
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:137:in `initialize'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:137:in `new'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:137:in `create_openssl_socket'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:39:in `initialize'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:26:in `new'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:26:in `create_socket'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:752:in `block in connect'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/timeout.rb:186:in `block in timeout'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/timeout.rb:193:in `timeout'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:748:in `connect'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:511:in `query'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:177:in `query'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1246:in `do_get_block'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1023:in `block in do_request'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1137:in `protect_keep_alive_disconnected'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1018:in `do_request'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1108:in `follow_redirect'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:655:in `get_content'
test/test_ssl.rb:65:in `test_sync'
     62:     cfg.set_client_cert_file(path('client.cert'), path('client.key'))
     63:     cfg.add_trust_ca(path('ca.cert'))
     64:     cfg.add_trust_ca(path('subca.cert'))
  => 65:     assert_equal("hello", @client.get_content(@url))
     66: 
     67:     @client.socket_sync = false
     68:     @client.reset_all
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_tcp_keepalive(TestSSL): HTTPClient::ConnectTimeoutError: execution expired
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:103:in `connect'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:103:in `ssl_connect'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:41:in `initialize'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:26:in `new'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:26:in `create_socket'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:752:in `block in connect'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/timeout.rb:186:in `block in timeout'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/timeout.rb:193:in `timeout'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:748:in `connect'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:511:in `query'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:177:in `query'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1246:in `do_get_block'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1023:in `block in do_request'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1137:in `protect_keep_alive_disconnected'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1018:in `do_request'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1108:in `follow_redirect'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:655:in `get_content'
test/test_ssl.rb:397:in `test_tcp_keepalive'
     394:   def test_tcp_keepalive
     395:     @client.tcp_keepalive = true
     396:     @client.ssl_config.add_trust_ca(path('ca-chain.pem'))
  => 397:     @client.get_content(@url)
     398: 
     399:     # expecting HTTP keepalive caches the socket
     400:     session = @client.instance_variable_get(:@session_manager).send(:get_cached_session, HTTPClient::Site.new(URI.parse(@url)))
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_timeout(TestSSL): HTTPClient::ConnectTimeoutError: execution expired
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:103:in `connect'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:103:in `ssl_connect'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:41:in `initialize'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:26:in `new'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:26:in `create_socket'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:752:in `block in connect'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/timeout.rb:186:in `block in timeout'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/timeout.rb:193:in `timeout'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:748:in `connect'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:511:in `query'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:177:in `query'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1246:in `do_get_block'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1023:in `block in do_request'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1137:in `protect_keep_alive_disconnected'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1018:in `do_request'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1108:in `follow_redirect'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:655:in `get_content'
test/test_ssl.rb:414:in `test_timeout'
     411:   def test_timeout
     412:     url = "https://localhost:#{serverport}/"
     413:     @client.ssl_config.add_trust_ca(path('ca-chain.pem'))
  => 414:     assert_equal('sleep', @client.get_content(url + 'sleep?sec=2'))
     415:     @client.receive_timeout = 1
     416:     @client.reset_all
     417:     assert_equal('sleep', @client.get_content(url + 'sleep?sec=0'))
=============================================================================================================================================================================================================================================
O
=============================================================================================================================================================================================================================================
Omission: TODO: it does not pass with Java 7 or old openssl [test_use_higher_TLS(TestSSL)]
test/test_ssl.rb:270:in `test_use_higher_TLS'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_verification(TestSSL): HTTPClient::ConnectTimeoutError: execution expired
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:103:in `connect'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:103:in `ssl_connect'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:41:in `initialize'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:26:in `new'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/ssl_socket.rb:26:in `create_socket'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:752:in `block in connect'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/timeout.rb:186:in `block in timeout'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/timeout.rb:193:in `timeout'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:748:in `connect'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:511:in `query'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient/session.rb:177:in `query'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1246:in `do_get_block'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1023:in `block in do_request'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1137:in `protect_keep_alive_disconnected'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:1018:in `do_request'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:860:in `request'
/home/yahonda/src/github.com/nahi/httpclient/lib/httpclient.rb:743:in `get'
test/test_ssl.rb:100:in `test_verification'
      97:     cfg.verify_callback = method(:verify_callback).to_proc
      98:     begin
      99:       @verify_callback_called = false
  => 100:       @client.get(@url)
     101:       assert(false)
     102:     rescue OpenSSL::SSL::SSLError => ssle
     103:       assert_match(/(certificate verify failed|unable to find valid certification path to requested target)/, ssle.message)
=============================================================================================================================================================================================================================================
Finished in 422.27584503 seconds.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
16 tests, 14 assertions, 3 failures, 8 errors, 0 pendings, 2 omissions, 0 notifications
21.4286% passed
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
0.04 tests/s, 0.03 assertions/s
$
yahonda commented 6 months ago

Error: test_ciphers(TestSSL): OpenSSL::SSL::SSLError: SSL_CTX_use_certificate: ee key too small

It looks like it needs to re-generate these certificates and keys to address "ee key too small" error. https://github.com/nahi/httpclient/commit/45f0c327387470941a0ac93d5ce666748505c140