Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby-openssl
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: eb200e5341e8
Choose a base ref
...
head repository: jruby/jruby-openssl
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c90d28424b56
Choose a head ref
  • 3 commits
  • 2 files changed
  • 2 contributors

Commits on May 3, 2016

  1. Make ALL cipherstring match ECDHE cihphers

    This matches the MRI behavior.
    jgaxn committed May 3, 2016
    Copy the full SHA
    b448c10 View commit details

Commits on May 4, 2016

  1. Copy the full SHA
    7284d27 View commit details
  2. Merge pull request #91 from jgaxn/cipherstrings_all_ecdhe

    Make ALL cipher string match ECDHE ciphers
    kares committed May 4, 2016
    Copy the full SHA
    c90d284 View commit details
Showing with 44 additions and 2 deletions.
  1. +1 −1 src/main/java/org/jruby/ext/openssl/CipherStrings.java
  2. +43 −1 src/test/ruby/ssl/test_context.rb
2 changes: 1 addition & 1 deletion src/main/java/org/jruby/ext/openssl/CipherStrings.java
Original file line number Diff line number Diff line change
@@ -598,7 +598,7 @@ private static Collection<Def> matchingPattern(
static {
Definitions = new HashMap<String, Def>( 48, 1 );
// TODO review base on OpenSSL's static const SSL_CIPHER cipher_aliases[] ?!
Definitions.put(SSL_TXT_ALL,new Def(0,SSL_TXT_ALL, 0,SSL_ALL & ~SSL_eNULL & ~SSL_kECDH & ~SSL_kECDHE, SSL_ALL ,0,0,0,SSL_ALL,SSL_ALL));
Definitions.put(SSL_TXT_ALL,new Def(0,SSL_TXT_ALL, 0,SSL_ALL & ~SSL_eNULL, SSL_ALL ,0,0,0,SSL_ALL,SSL_ALL));
Definitions.put(SSL_TXT_CMPALL,new Def(0,SSL_TXT_CMPALL,0,SSL_eNULL,0,0,0,0,SSL_ENC_MASK,0));
Definitions.put(SSL_TXT_CMPDEF,new Def(0,SSL_TXT_CMPDEF,0,SSL_ADH, 0,0,0,0,SSL_AUTH_MASK,0));
Definitions.put(SSL_TXT_kKRB5,new Def(0,SSL_TXT_kKRB5,0,SSL_kKRB5,0,0,0,0,SSL_MKEY_MASK,0));
44 changes: 43 additions & 1 deletion src/test/ruby/ssl/test_context.rb
Original file line number Diff line number Diff line change
@@ -102,4 +102,46 @@ def test_context_set_ssl_version
assert_raises(TypeError) { context.ssl_version = 12 }
end

end
def test_context_ciphers
context = OpenSSL::SSL::SSLContext.new
context.ciphers = "ALL"

all_ciphers = context.ciphers.map{|cipher_array| cipher_array[0]}

expected_ciphers = ["ECDHE-ECDSA-AES256-SHA",
"ECDHE-RSA-AES256-SHA",
"AES256-SHA",
"ECDH-ECDSA-AES256-SHA",
"ECDH-RSA-AES256-SHA",
"DHE-RSA-AES256-SHA",
"DHE-DSS-AES256-SHA",
"ECDHE-ECDSA-AES128-SHA256",
"ECDHE-RSA-AES128-SHA256",
"ECDH-ECDSA-AES128-SHA256",
"ECDH-RSA-AES128-SHA256",
"ECDHE-ECDSA-AES128-SHA",
"ECDHE-RSA-AES128-SHA",
"AES128-SHA",
"ECDH-ECDSA-AES128-SHA",
"ECDH-RSA-AES128-SHA",
"DHE-RSA-AES128-SHA",
"DHE-DSS-AES128-SHA",
"ECDHE-ECDSA-DES-CBC3-SHA",
"ECDHE-RSA-DES-CBC3-SHA",
"DES-CBC3-SHA",
"ECDH-ECDSA-DES-CBC3-SHA",
"ECDH-RSA-DES-CBC3-SHA",
"EDH-RSA-DES-CBC3-SHA",
"EDH-DSS-DES-CBC3-SHA",
"AECDH-AES256-SHA",
"ADH-AES256-SHA",
"AECDH-AES128-SHA",
"ADH-AES128-SHA",
"AECDH-DES-CBC3-SHA",
"ADH-DES-CBC3-SHA"]

expected_ciphers.each do |cipher|
assert all_ciphers.include?(cipher), "#{cipher} should have been included"
end
end if RUBY_VERSION > '1.9'
end