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: 60b9adc6c917
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: b33f80f23fe4
Choose a head ref
  • 3 commits
  • 3 files changed
  • 1 contributor

Commits on Nov 21, 2015

  1. Copy the full SHA
    86e3915 View commit details
  2. source code :spacing:

    kares committed Nov 21, 2015
    Copy the full SHA
    4fbf49e View commit details
  3. Copy the full SHA
    b33f80f View commit details
Showing with 11 additions and 5 deletions.
  1. +2 −2 src/main/java/org/jruby/ext/openssl/X509StoreContext.java
  2. +1 −1 src/test/ruby/ssl/test_ssl.rb
  3. +8 −2 src/test/ruby/x509/test_x509store.rb
4 changes: 2 additions & 2 deletions src/main/java/org/jruby/ext/openssl/X509StoreContext.java
Original file line number Diff line number Diff line change
@@ -119,8 +119,8 @@ public IRubyObject initialize(final ThreadContext context, final IRubyObject[] a
_cert = null;
}
else {
if (! (cert instanceof X509Cert)) {
throw getRuntime().newTypeError(cert, "OpenSSL::X509::Certificate");
if ( ! (cert instanceof X509Cert) ) {
throw context.runtime.newTypeError(cert, "OpenSSL::X509::Certificate");
}
_cert = ((X509Cert) cert).getAuxCert();
}
2 changes: 1 addition & 1 deletion src/test/ruby/ssl/test_ssl.rb
Original file line number Diff line number Diff line change
@@ -151,6 +151,6 @@ def test_read_nonblock_would_block

ssl.close
end
end
end if RUBY_VERSION > '1.9'

end
10 changes: 8 additions & 2 deletions src/test/ruby/x509/test_x509store.rb
Original file line number Diff line number Diff line change
@@ -11,12 +11,18 @@ def setup
@pem = File.expand_path('../EntrustnetSecureServerCertificationAuthority.pem', __FILE__)
end

@@ssl_cert_file = ENV['SSL_CERT_FILE']

def teardown
ENV['SSL_CERT_FILE'] = @@ssl_cert_file
end

def test_store_location_with_pem
ENV['SSL_CERT_FILE'] = nil
store = OpenSSL::X509::Store.new
store.set_default_paths
assert !store.verify(@cert)

ENV['SSL_CERT_FILE'] = @ca_cert
store = OpenSSL::X509::Store.new
assert !store.verify(@cert)
@@ -64,7 +70,7 @@ def test_use_non_existing_cert_file

def test_verfy_with_wrong_argument
store = OpenSSL::X509::Store.new
assert_raise(TypeError) { store.verify( 'not an cert object' ) }
assert_raise(TypeError) { store.verify( 'not a cert object' ) }
end

def test_add_cert_concurrently