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: 2678bab65a6a
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: bf9420c5c607
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Oct 26, 2016

  1. Don't print a warning for missing client certs

    When you run Ruby with warnings enabled and your (HTTPS) server does not verify clients you don't expect to see a warning about clients not being verified. 
    
    For example, WEBrick's default configuration does not verify client certificates (https://github.com/jruby/jruby/blob/b610805cd55ef5d56d8e431918753fc92fad5ef5/lib/ruby/stdlib/webrick/ssl.rb#L74), but when running an HTTP server in JRuby it prints "warning: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated" for every request. This does not happen in MRI.
    iconara committed Oct 26, 2016
    Copy the full SHA
    6a4ee35 View commit details
  2. Merge pull request #110 from iconara/no-warnings-on-missing-client-cert

    Don't print a warning for missing client certs
    kares authored Oct 26, 2016
    Copy the full SHA
    bf9420c View commit details
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/main/java/org/jruby/ext/openssl/SSLSocket.java
2 changes: 1 addition & 1 deletion src/main/java/org/jruby/ext/openssl/SSLSocket.java
Original file line number Diff line number Diff line change
@@ -958,7 +958,7 @@ public IRubyObject peer_cert() {
throw X509Cert.newCertificateError(runtime, e);
}
catch (SSLPeerUnverifiedException e) {
if (runtime.isVerbose() || OpenSSL.isDebug(runtime)) {
if (OpenSSL.isDebug(runtime)) {
runtime.getWarnings().warning(String.format("%s: %s", e.getClass().getName(), e.getMessage()));
}
}