SecureNIO

A minimal, non-blocking Java NIO TCP framework supporting SSL/TLS


Project maintained by dermitza Hosted on GitHub Pages — Theme by mattgraham

SecureNIO SecureNIO

A minimal, non-blocking, Java NIO TCP framework supporting SSL/TLS

Features

Changes

Binaries

All binaries are compiled using Java 1.7.0_09; Java HotSpot(TM) 64-Bit Server VM 23.5-b02 unless otherwise noted.

Documentation

Examples

Two examples on how to use this framework are provided, each in their respective packages:

Generating self-signed KeyStores (public and private keys) and TrustStores (public keys)

Sample server and client KeyStores and TrustStores have been provided and are ready to use. Needless to say, do not use these for anything other than testing. Steps to create a self-signed KeyStore (and certificates) and TrustStore for a server implementation:

  1. Generate a server KeyStore
keytool -genkey -keyalg RSA -alias server -keystore server.jks -storepass server -validity 360 -keysize 2048
  1. Extract the public key from the public-private key pair that you created
keytool -export -alias server -keystore server.jks -rfc -file serverPublic.cert
  1. Create the truststore using the public key (advised to use a different password, e.g. serverPublic)
keytool -import -alias server -file serverPublic.cert -keystore serverPublic.jks -storetype JKS

You can now use the serverPublic.jks in your clients to authenticate the server. To generate a KeyStore and/or TrustStore for the client (two-way authentication), repeat the above steps using appropriate names (i.e. replace server with client where appropriate).

JavaDoc

You can browse the JavaDoc for the current release here. Additional documentation (sometimes extensive) is included in the source files.

License

GNU AFFERO GENERAL PUBLIC LICENSE Version 3

Copyright (C) 2014 K. Dermitzakis dermitza@gmail.com

SecureNIO is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

SecureNIO is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with SecureNIO. If not, see http://www.gnu.org/licenses/.