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
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: c75accf46238
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0e48331150c4
Choose a head ref
  • 7 commits
  • 45 files changed
  • 1 contributor

Commits on Dec 21, 2015

  1. Copy the full SHA
    0bc7a2e View commit details
  2. Copy the full SHA
    b13acf9 View commit details
  3. Copy the full SHA
    901b94f View commit details
  4. Copy the full SHA
    4825f60 View commit details
  5. Copy the full SHA
    c989c72 View commit details
  6. Copy the full SHA
    19b5a22 View commit details

Commits on Dec 22, 2015

  1. Copy the full SHA
    0e48331 View commit details
Showing with 909 additions and 460 deletions.
  1. +5 −5 .travis.yml
  2. +4 −4 lib/pom.rb
  3. +7 −1 lib/pom.xml
  4. BIN lib/src/empty.jar
  5. +1 −4 test/mri/excludes/OpenSSL/TestBN.rb
  6. 0 test/mri/excludes/OpenSSL/TestDigest.rb
  7. +4 −4 test/mri/excludes/OpenSSL/TestEOF1LowlevelSocket.rb
  8. +4 −4 test/mri/excludes/OpenSSL/TestEOF2LowlevelSocket.rb
  9. +1 −3 test/mri/excludes/OpenSSL/TestPair.rb
  10. +1 −12 test/mri/excludes/OpenSSL/TestPairLowLevelSocket.rb
  11. +19 −8 test/mri/excludes/OpenSSL/TestSSL.rb
  12. +9 −8 test/mri/excludes/OpenSSL/TestSSLSession.rb
  13. +2 −2 test/mri/excludes/OpenSSL/TestX509Certificate.rb
  14. +0 −81 test/mri/openssl/ssl_server.rb
  15. +6 −6 test/mri/openssl/test_asn1.rb
  16. +2 −1 test/mri/openssl/test_bn.rb
  17. +3 −2 test/mri/openssl/test_buffering.rb
  18. +0 −150 test/mri/openssl/test_certificate.rb
  19. +8 −2 test/mri/openssl/test_cipher.rb
  20. +2 −1 test/mri/openssl/test_config.rb
  21. +3 −2 test/mri/openssl/test_digest.rb
  22. +2 −1 test/mri/openssl/test_engine.rb
  23. +2 −1 test/mri/openssl/test_fips.rb
  24. +2 −1 test/mri/openssl/test_hmac.rb
  25. +2 −1 test/mri/openssl/test_ns_spki.rb
  26. +2 −1 test/mri/openssl/test_ocsp.rb
  27. +158 −5 test/mri/openssl/test_pair.rb
  28. +3 −4 test/mri/openssl/test_partial_record_read.rb
  29. +5 −4 test/mri/openssl/test_pkcs12.rb
  30. +2 −1 test/mri/openssl/test_pkcs5.rb
  31. +2 −1 test/mri/openssl/test_pkcs7.rb
  32. +24 −2 test/mri/openssl/test_pkey_dh.rb
  33. +2 −1 test/mri/openssl/test_pkey_dsa.rb
  34. +2 −1 test/mri/openssl/test_pkey_ec.rb
  35. +2 −1 test/mri/openssl/test_pkey_rsa.rb
  36. +17 −0 test/mri/openssl/test_random.rb
  37. +479 −29 test/mri/openssl/test_ssl.rb
  38. +47 −34 test/mri/openssl/test_ssl_session.rb
  39. +2 −1 test/mri/openssl/test_x509cert.rb
  40. +2 −1 test/mri/openssl/test_x509crl.rb
  41. +2 −1 test/mri/openssl/test_x509ext.rb
  42. +2 −1 test/mri/openssl/test_x509name.rb
  43. +2 −1 test/mri/openssl/test_x509req.rb
  44. +2 −2 test/mri/openssl/test_x509store.rb
  45. +63 −65 test/mri/openssl/utils.rb
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -40,11 +40,11 @@ env:
- PHASE='-Prake -Dtask=spec:jruby'
- PHASE='-Prake -Dtask=spec:jrubyc'
- PHASE='-Prake -Dtask=spec:profiler'
- PHASE='-Ptruffle-specs-language'
- PHASE='-Ptruffle-specs-core'
- PHASE='-Ptruffle-specs-library'
- PHASE='-Ptruffle-specs-truffle'
- PHASE='-Ptruffle-mri-tests'
#- PHASE='-Ptruffle-specs-language'
#- PHASE='-Ptruffle-specs-core'
#- PHASE='-Ptruffle-specs-library'
#- PHASE='-Ptruffle-specs-truffle'
#- PHASE='-Ptruffle-mri-tests'

matrix:
include:
8 changes: 4 additions & 4 deletions lib/pom.rb
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ def initialize( name, version, default_spec = true )

default_gems =
[
ImportedGem.new( 'jruby-openssl', '0.9.12' ),
ImportedGem.new( 'jruby-openssl', '0.9.13' ),
ImportedGem.new( 'jruby-readline', '1.0', false ),
ImportedGem.new( 'rake', '${rake.version}' ),
ImportedGem.new( 'rdoc', '${rdoc.version}' ),
@@ -48,8 +48,8 @@ def initialize( name, version, default_spec = true )
#repository( :url => 'http://rubygems-proxy.torquebox.org/releases',
# :id => 'tb-rubygems-releases' )
# for testing out jruby-ossl before final release :
#repository( :url => 'http://oss.sonatype.org/content/repositories/staging',
# :id => 'gem-staging' )
repository( :url => 'http://oss.sonatype.org/content/repositories/staging',
:id => 'gem-staging' )

plugin( :clean,
:filesets => [ { :directory => '${basedir}/ruby/gems/shared/specifications/default',
@@ -186,7 +186,7 @@ def initialize( name, version, default_spec = true )

specname = File.basename( specfile )
puts "copy to specifications/default: #{specname}"

spec = Gem::Package.new( Dir[ File.join( cache, "#{g.name}-#{version}*.gem" ) ].first ).spec
File.open( File.join( default_specs, specname ), 'w' ) do |f|
f.print( spec.to_ruby )
8 changes: 7 additions & 1 deletion lib/pom.xml
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ DO NOT MODIFIY - GENERATED CODE
<dependency>
<groupId>rubygems</groupId>
<artifactId>jruby-openssl</artifactId>
<version>0.9.12</version>
<version>0.9.13</version>
<type>gem</type>
<scope>provided</scope>
<exclusions>
@@ -175,6 +175,12 @@ DO NOT MODIFIY - GENERATED CODE
</exclusions>
</dependency>
</dependencies>
<repositories>
<repository>
<id>gem-staging</id>
<url>http://oss.sonatype.org/content/repositories/staging</url>
</repository>
</repositories>
<build>
<resources>
<resource>
Binary file removed lib/src/empty.jar
Binary file not shown.
5 changes: 1 addition & 4 deletions test/mri/excludes/OpenSSL/TestBN.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
exclude :test_new_bn, ''
exclude :test_new_integer, ''
exclude :test_new_str, ''
exclude :test_to_bn, ''
exclude :test_new_str, 'needs investigation'
Empty file.
8 changes: 4 additions & 4 deletions test/mri/excludes/OpenSSL/TestEOF1LowlevelSocket.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
exclude :test_eof_0, "hangs"
exclude :test_eof_1, "hangs"
exclude :test_eof_2, "hangs"
exclude :test_eof_3, "hangs"
#exclude :test_eof_0, "hangs"
#exclude :test_eof_1, "hangs"
#exclude :test_eof_2, "hangs"
#exclude :test_eof_3, "hangs"
8 changes: 4 additions & 4 deletions test/mri/excludes/OpenSSL/TestEOF2LowlevelSocket.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
exclude :test_eof_0, "hangs"
exclude :test_eof_1, "hangs"
exclude :test_eof_2, "hangs"
exclude :test_eof_3, "hangs"
#exclude :test_eof_0, "hangs"
#exclude :test_eof_1, "hangs"
#exclude :test_eof_2, "hangs"
#exclude :test_eof_3, "hangs"
4 changes: 1 addition & 3 deletions test/mri/excludes/OpenSSL/TestPair.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
exclude :test_read_nonblock, "needs investigation"
exclude :test_read_nonblock_no_exception, "needs investigation"
exclude :test_readpartial, "needs investigation"
exclude :test_connect_accept_nonblock_no_exception, "SSLError: Cannot change mode after SSL traffic has started"
13 changes: 1 addition & 12 deletions test/mri/excludes/OpenSSL/TestPairLowLevelSocket.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1 @@
exclude :test_getc, "hangs"
exclude :test_puts_empty, "hangs"
exclude :test_puts_meta, "hangs"
exclude :test_read_nonblock, "hangs"
exclude :test_read_nonblock_no_exception, "hangs"
exclude :test_readall, "hangs"
exclude :test_readline, "hangs"
exclude :test_readpartial, "hangs"
exclude :test_write_nonblock, "hangs"
exclude :test_write_nonblock_no_exceptions, "hangs"
exclude :test_write_nonblock_with_buffered_data, "hangs"
exclude :test_write_nonblock_with_buffered_data_no_exceptions, "hangs"
exclude :test_connect_accept_nonblock_no_exception, "SSLError: Cannot change mode after SSL traffic has started"
27 changes: 19 additions & 8 deletions test/mri/excludes/OpenSSL/TestSSL.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
exclude :test_client_ca, 'needs investigation'
exclude :test_close_after_socket_close, "needs investigation"
exclude :test_post_connection_check, 'needs investigation'
exclude :test_read_nonblock_without_session, 'hangs'
exclude :test_read_and_write, 'needs investigation'
exclude :test_renegotiation_cb, 'needs investigation'
exclude :test_ssl_gets, 'encoding issue'
exclude :test_tlsext_hostname, 'needs investigation'
exclude :test_unset_OP_ALL, 'needs investigation'
exclude :test_ctx_setup_invalid, 'works sufficiently - low priority'
exclude :test_read_nonblock_without_session, 'HANGS'
exclude :test_renegotiation_cb, 'SSLContext#renegotiation_cb= not supported'
exclude :test_verify_certificate_identity, 'needs investigation'
exclude :test_options_setting_nil_means_all, 'needs investigation'
exclude :test_options_defaults_to_OP_ALL_on, 'needs investigation'
exclude :test_alpn_protocol_selection_ary, 'SSLContext#alpn_select_cb= not supported'
exclude :test_alpn_protocol_selection_cancel, 'SSLContext#alpn_select_cb= not supported'
exclude :test_npn_advertised_protocol_too_long, 'SSLContext#npn_protocols= not supported'
exclude :test_npn_protocol_selection_ary, 'SSLContext#npn_protocols= not supported'
exclude :test_npn_protocol_selection_cancel, 'SSLContext#npn_protocols= not supported'
exclude :test_npn_protocol_selection_enum, 'SSLContext#npn_protocols= not supported'
exclude :test_npn_selected_protocol_too_long, 'SSLContext#npn_protocols= not supported'
exclude :test_post_connect_check_with_anon_ciphers, 'needs investigation'
exclude :test_ssl_sysread_blocking_error, 'works except JRuby-OpenSSL does not raise TypeError on SSLSocket#sysread(4, exception: false)'
exclude :test_servername_cb, 'Errno::EOPNOTSUPP: Operation not supported - Socket.socketpair only supports streaming UNIX sockets'
exclude :test_servername_cb_calls_setup_on_returned_ctx, 'Errno::EOPNOTSUPP: Operation not supported - Socket.socketpair only supports streaming UNIX sockets'
exclude :test_servername_cb_can_return_nil, 'Errno::EOPNOTSUPP: Operation not supported - Socket.socketpair only supports streaming UNIX sockets'
exclude :test_servername_cb_raises_an_exception_on_unknown_objects, 'Errno::EOPNOTSUPP: Operation not supported - Socket.socketpair only supports streaming UNIX sockets'
exclude :test_servername_cb_sets_context_on_the_socket, 'Errno::EOPNOTSUPP: Operation not supported - Socket.socketpair only supports streaming UNIX sockets'
17 changes: 9 additions & 8 deletions test/mri/excludes/OpenSSL/TestSSLSession.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
exclude :test_client_session, "needs investigation"
exclude :test_ctx_client_session_cb, "needs investigation"
exclude :test_ctx_server_session_cb, "needs investigation"
exclude :test_server_session, "needs investigation"
exclude :test_session, "needs investigation"
exclude :test_session_equals, "needs investigation"
exclude :test_session_time, "needs investigation"
exclude :test_session_timeout, "needs investigation"
exclude :test_client_session, "HANGS"
exclude :test_ctx_client_session_cb, "session_new_cb= not supported"
exclude :test_ctx_server_session_cb, "session_get_cb= not supported"
exclude :test_server_session, "HANGS"
exclude :test_session, "HANGS"
exclude :test_session_equals, "OpenSSL::SSL::Session.new not implemented"
exclude :test_session_time, "OpenSSL::SSL::Session.new not implemented"
exclude :test_session_timeout, "OpenSSL::SSL::Session.new not implemented"
exclude :test_session_exts_read, "OpenSSL::SSL::Session.new not implemented"
4 changes: 2 additions & 2 deletions test/mri/excludes/OpenSSL/TestX509Certificate.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
exclude :test_public_key, "new failure but we really want to run this test"
warn "!!! excluding TestX509Certificate#test_public_key"
#exclude :test_public_key, "new failure but we really want to run this test"
#warn "!!! excluding TestX509Certificate#test_public_key"
81 changes: 0 additions & 81 deletions test/mri/openssl/ssl_server.rb

This file was deleted.

12 changes: 6 additions & 6 deletions test/mri/openssl/test_asn1.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
require_relative 'utils'

class OpenSSL::TestASN1 < Test::Unit::TestCase
@@ -186,13 +187,12 @@ def test_decode
assert_equal(OpenSSL::ASN1::Null, pkey.value[0].value[1].class)

assert_equal(OpenSSL::ASN1::BitString, sig_val.class)

#cululated_sig = key.sign(OpenSSL::Digest::SHA1.new, tbs_cert.to_der)
#assert_equal(cululated_sig, sig_val.value)
# JRuby :
# since the direct compare of signatures does not work
# we verify the signature via the certificate itself
assert OpenSSL::X509::Certificate.new( cert.to_der ).verify key

#cululated_sig = key.sign(OpenSSL::Digest::SHA1.new, tbs_cert.to_der)
#assert_equal(cululated_sig, sig_val.value)
end

def test_encode_boolean
@@ -557,7 +557,7 @@ def test_bit_string_infinite_length
end

def test_primitive_inf_length
assert_raises(OpenSSL::ASN1::ASN1Error) do
assert_raise(OpenSSL::ASN1::ASN1Error) do
spec = %w{ 02 80 02 01 01 00 00 }
raw = [spec.join('')].pack('H*')
OpenSSL::ASN1.decode(raw)
@@ -610,5 +610,5 @@ def assert_universal(tag, asn1)
assert_equal(:UNIVERSAL, asn1.tag_class)
end

end if defined?(OpenSSL)
end if defined?(OpenSSL::TestUtils)

3 changes: 2 additions & 1 deletion test/mri/openssl/test_bn.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# frozen_string_literal: false
require_relative 'utils'

if defined?(OpenSSL)
if defined?(OpenSSL::TestUtils)

class OpenSSL::TestBN < Test::Unit::TestCase
def test_new_str
5 changes: 3 additions & 2 deletions test/mri/openssl/test_buffering.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
require_relative 'utils'
require 'stringio'

@@ -61,7 +62,7 @@ def @io.syswrite *a
raise SystemCallError, 'fail'
end

assert_raises SystemCallError do
assert_raise SystemCallError do
@io.flush
end

@@ -84,4 +85,4 @@ def test_each_byte
assert_equal([97, 98, 99], res)
end

end if defined?(OpenSSL)
end if defined?(OpenSSL::TestUtils)
Loading