com.flat502.rox.server
Class SimpleSSLSessionPolicy
java.lang.Object
com.flat502.rox.server.SimpleSSLSessionPolicy
- All Implemented Interfaces:
- SSLSessionPolicy
public class SimpleSSLSessionPolicy
- extends java.lang.Object
- implements SSLSessionPolicy
A very simple SSL session policy that rejects sessions based on
a white-list of subjects and/or issuer names.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleSSLSessionPolicy
public SimpleSSLSessionPolicy()
SimpleSSLSessionPolicy
public SimpleSSLSessionPolicy(java.lang.String pattern)
SimpleSSLSessionPolicy
public SimpleSSLSessionPolicy(java.util.regex.Pattern pattern)
allowSubject
public void allowSubject(java.lang.String pattern)
allowSubject
public void allowSubject(java.util.regex.Pattern pattern)
allowIssuer
public void allowIssuer(java.lang.String pattern)
allowIssuer
public void allowIssuer(java.util.regex.Pattern pattern)
shouldRetain
public boolean shouldRetain(java.nio.channels.SocketChannel channel,
SSLSession session)
- Description copied from interface:
SSLSessionPolicy
- Consulted to determine whether or not the given
SSLSession
should be retained.
Implementations should avoid any calls on the channel
that may block. Blocking the calling thread will have
a significant impact on throughput on the server.
- Specified by:
shouldRetain
in interface SSLSessionPolicy
- Parameters:
channel
- The SocketChannel
that has just been
accepted.session
- The SSLSession
that has just completed
handshaking.
- Returns:
true
if the channel should be retained,
or false
if it should be closed and
discarded.