Skip to content

Commit ca977bd

Browse files
committed
Merge branch 'master' of github.com:jruby/jruby-openssl
* 'master' of github.com:jruby/jruby-openssl: [fix] replace deprecated getPeerCertificateChain (#231) [ci] Improve Travis CI build Performance (#234)
2 parents 6a6ad74 + 5cd5527 commit ca977bd

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ before_script:
2424
script: jruby -rbundler/setup -S rake test
2525

2626
matrix:
27+
fast_finish: true
2728
allow_failures:
2829
- rvm: jruby-head
2930
- script: jruby -rbundler/setup -S rake integration:install integration:test
@@ -64,3 +65,7 @@ notifications:
6465
template:
6566
- "%{repository} (%{branch}:%{commit} by %{author}): %{message} (%{build_url})"
6667
skip_join: true
68+
69+
cache:
70+
directories:
71+
- $HOME/.m2

src/main/java/org/jruby/ext/openssl/SSLSocket.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,15 +1043,15 @@ public IRubyObject peer_cert_chain(final ThreadContext context) {
10431043
if ( engine == null ) return runtime.getNil();
10441044

10451045
try {
1046-
javax.security.cert.Certificate[] certs = engine.getSession().getPeerCertificateChain();
1046+
Certificate[] certs = engine.getSession().getPeerCertificates();
10471047
IRubyObject[] cert_chain = new IRubyObject[ certs.length ];
10481048
for ( int i = 0; i < certs.length; i++ ) {
10491049
cert_chain[i] = X509Cert.wrap(context, certs[i]);
10501050
}
10511051
return runtime.newArrayNoCopy(cert_chain);
10521052
}
1053-
catch (javax.security.cert.CertificateEncodingException e) {
1054-
throw X509Cert.newCertificateError(getRuntime(), e);
1053+
catch (CertificateEncodingException e) {
1054+
throw X509Cert.newCertificateError(runtime, e);
10551055
}
10561056
catch (SSLPeerUnverifiedException e) {
10571057
if (runtime.isVerbose() || OpenSSL.isDebug(runtime)) {

0 commit comments

Comments
 (0)