/SSLSocket

An SSL socket server and client in JAVA

Primary LanguageJavaGNU General Public License v3.0GPL-3.0

SSLSocket

An SSL socket server and client in JAVA

Installation

git clone https://github.com/williamswhy/SSLSocket.git

Usage

Compile & prepare files

mkdir bin
javac -d bin src/client/*.java
javac -d bin src/server/*.java

Start server & client

server:

java server.SocketListener

client:

java client.SocketClient [address] [port] [message]

Generate SSL

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