Here is a test case that uses jSSLutils: http://code.google.com/p/jsslutils/
There are 8 tests, being the permutations of SslSelectChannelConnector/SslSocketConnector, X509/PKIX(cert revocation enabled), Good/Bad(i.e. revoked) client certificate.
They keystores are the ones I put in the jsslutils tests. These 5 files should be copied into modules/server/jetty-ssl/src/test/resources/
http://jsslutils.googlecode.com/svn/trunk/dummy.jks
http://jsslutils.googlecode.com/svn/trunk/certificates/localhost.p12
http://jsslutils.googlecode.com/svn/trunk/certificates/newca.crl
http://jsslutils.googlecode.com/svn/trunk/certificates/testclient-r.p12
http://jsslutils.googlecode.com/svn/trunk/certificates/testclient.p12
In addition, for the tests using the SslSocketConnector, this patch has to be applied:
— a/modules/server/jetty/src/main/java/org/mortbay/io/bio/SocketEndPoint.java
+++ b/modules/server/jetty/src/main/java/org/mortbay/io/bio/SocketEndPoint.java
@@ -20,6 +20,8 @@ import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.Socket;
+import javax.net.ssl.SSLSocket;
+
import org.mortbay.io.Portable;
/**
@@ -57,7 +59,7 @@ public class SocketEndPoint extends StreamEndPoint
*/
public void close() throws IOException
{
- if (!_socket.isClosed() && !_socket.isOutputShutdown())
+ if (!_socket.isClosed() && !_socket.isOutputShutdown() && !(_socket instanceof SSLSocket))
_socket.shutdownOutput();
_socket.close();
_in=null;
(I'll submit another issue for this problem.)
looks handy,
any chance you could add a test case for this? perhaps using your jsslutils artifact as a test scoped dependency?