Hi,
I've merged the SSL implementation with the TCP implementation to make
SSL implementation much more simpler. All SSL* classes have been
removed. Now supporting SSL just consist of adding the SSLReadFilter,
which is much more easy :-)
Hopefully I didn't break any existing application. In case I did, here
is an example on how to use SSL (I've unit test except I need to learn
how to create dummy keystore/trustore before enabling them)
> 124 sslContext.init(keyManagerFactory.getKeyManagers(), null, null);
> 125
> 126 // Create and configure a select handler
> 127 TCPSelectorHandler selectorHandler = new TCPSelectorHandler();
> 128
> 129 // Create the Grizzly filters
> 130 final SSLReadFilter readFilter = new SSLReadFilter();
> 131 readFilter.setSSLContext(sslContext);
> 132
> 133 if (isNeedClientAuthentication()) {
> 134 readFilter.setNeedClientAuth(isNeedClientAuthentication());
> 135 } else if (isWantClientAuthentication()) {
> 136 readFilter.setWantClientAuth(isWantClientAuthentication());
> 137 }
> 138
> 139 selectorHandler.setPort(8181);
> 140 if (getServer().getAddress() != null) {
> 141 selectorHandler.setInet(InetAddress.getByName(getServer()
> 142 .getAddress()));
> 143 }
> 144 final HttpParserFilter httpParserFilter = new HttpParserFilter(this);
> 145
> 146 // Create the Grizzly controller
> 147 controller.setSelectorHandler(selectorHandler);
Much more simpler :-) This will also make it easy to implement an SSL
non blocking client.
Please review :-)
Thanks
-- Jeanfrancois