Skip to content

williamswhy/SSLSocket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

An SSL socket server and client in JAVA

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages