mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Handle unauthenticated case
This commit is contained in:
parent
485bc9b81f
commit
ad27aa82bb
1 changed files with 6 additions and 2 deletions
|
@ -336,7 +336,11 @@ public class MiniSSL extends RubyObject {
|
|||
}
|
||||
|
||||
@JRubyMethod
|
||||
public IRubyObject peercert() throws SSLPeerUnverifiedException, CertificateEncodingException {
|
||||
return JavaEmbedUtils.javaToRuby(getRuntime(), engine.getSession().getPeerCertificates()[0].getEncoded());
|
||||
public IRubyObject peercert() throws CertificateEncodingException {
|
||||
try {
|
||||
return JavaEmbedUtils.javaToRuby(getRuntime(), engine.getSession().getPeerCertificates()[0].getEncoded());
|
||||
} catch (SSLPeerUnverifiedException ex) {
|
||||
return getRuntime().getNil();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue