Skip to content

Commit 5292638

Browse files
committed
allow for unwrapping the native SSLSession (for experiments) using to_java
1 parent d16695e commit 5292638

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,4 +150,12 @@ public IRubyObject set_timeout(final ThreadContext context, IRubyObject timeout)
150150
return timeout;
151151
}
152152

153+
@Override
154+
public Object toJava(Class target) {
155+
if ( javax.net.ssl.SSLSession.class.isAssignableFrom(target) ) {
156+
return sslSession();
157+
}
158+
return super.toJava(target);
159+
}
160+
153161
}

0 commit comments

Comments
 (0)