mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Unskip two jruby ssl tests that were hanging.
1. Fix the conversion of a nil verify_mode to integer (was throwing 'no implicit conversion of nil into Integer') 2. Use the correct keystore password. 3. Use cipher suites that are supported in Java 8.
This commit is contained in:
parent
dab5ff1f4f
commit
32ac93ab65
5 changed files with 4 additions and 6 deletions
|
@ -173,7 +173,7 @@ public class MiniSSL extends RubyObject {
|
|||
engine.setEnabledProtocols(protocols);
|
||||
engine.setUseClientMode(false);
|
||||
|
||||
long verify_mode = miniSSLContext.callMethod(threadContext, "verify_mode").convertToInteger().getLongValue();
|
||||
long verify_mode = miniSSLContext.callMethod(threadContext, "verify_mode").convertToInteger("to_i").getLongValue();
|
||||
if ((verify_mode & 0x1) != 0) { // 'peer'
|
||||
engine.setWantClientAuth(true);
|
||||
}
|
||||
|
|
|
@ -2,8 +2,8 @@ module SSLHelper
|
|||
def ssl_query
|
||||
@ssl_query ||= if Puma.jruby?
|
||||
@keystore = File.expand_path "../../../examples/puma/keystore.jks", __FILE__
|
||||
@ssl_cipher_list = "TLS_DHE_RSA_WITH_DES_CBC_SHA,TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA"
|
||||
"keystore=#{@keystore}&keystore-pass=pswd&ssl_cipher_list=#{@ssl_cipher_list}"
|
||||
@ssl_cipher_list = "TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"
|
||||
"keystore=#{@keystore}&keystore-pass=blahblah&ssl_cipher_list=#{@ssl_cipher_list}"
|
||||
else
|
||||
@cert = File.expand_path "../../../examples/puma/cert_puma.pem", __FILE__
|
||||
@key = File.expand_path "../../../examples/puma/puma_keypair.pem", __FILE__
|
||||
|
|
|
@ -367,7 +367,7 @@ end
|
|||
class TestBinderJRuby < TestBinderBase
|
||||
def test_binder_parses_jruby_ssl_options
|
||||
keystore = File.expand_path "../../examples/puma/keystore.jks", __FILE__
|
||||
ssl_cipher_list = "TLS_DHE_RSA_WITH_DES_CBC_SHA,TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA"
|
||||
ssl_cipher_list = "TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"
|
||||
|
||||
@binder.parse ["ssl://0.0.0.0:8080?#{ssl_query}"], @events
|
||||
|
||||
|
|
|
@ -66,7 +66,6 @@ class TestCLI < Minitest::Test
|
|||
end
|
||||
|
||||
def test_control_for_ssl
|
||||
skip_on :jruby # Hangs on CI, TODO fix
|
||||
require "net/http"
|
||||
control_port = UniquePort.call
|
||||
control_host = "127.0.0.1"
|
||||
|
|
|
@ -150,7 +150,6 @@ class TestPumaControlCli < TestConfigFileBase
|
|||
end
|
||||
|
||||
def test_control_ssl
|
||||
skip_on :jruby # Hanging on JRuby, TODO fix
|
||||
host = "127.0.0.1"
|
||||
port = UniquePort.call
|
||||
url = "ssl://#{host}:#{port}?#{ssl_query}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue