An SSL socket server and client in JAVA
git clone https://github.com/williamswhy/SSLSocket.git
mkdir bin
javac -d bin src/client/*.java
javac -d bin src/server/*.java
server:
java server.SocketListener
client:
java client.SocketClient [address] [port] [message]
Create a server keystore file:
keytool -genkey -keystore sslserverkeys -keyalg RSA
Export the key as a cert:
keytool -export -keystore sslserverkeys -file cert.cer -keyalg RSA
Add the cert to the trust store of the client:
keytool -import -keystore sslclienttrust -file cert.cer -keyalg RSA