Skip to content

aeugster/secure-tcp-socket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

secure-tcp-socket

Create secure connections without requirement of certificates and key stores. Optimized for Java 21.

Usage

  • Client & Server - start SecSocketExample and have a look at the log
  • Explore unitTest ExampleClientIT and connect to an existing server

Issues and Sonar

Issues: https://github.com/aeugster/secure-tcp-socket/issues

Sonar: https://sonarcloud.io/summary/overall?id=aeugster_secure-tcp-socket

Coverage Lines of Code Vulnerabilities

Exceptions

  • SecureSocketTechnicalException is thrown for unexpected errors
  • SecureSocketApplicationException is kind of expected. Currently, IOExceptions are used instead

Misc

Trigger sonar manually (login required)

Formatting

  • use intellij defaults (e.g. spaces instead of tab)

Motivation

The use of RestTemplate was not an option (since it relies on trusted certificates):

  • For 'lets encrypt' the server must be public
  • For private CA the JRE needs cert import
  • Long polls would be needed for information-push to the client

Java SSLSocket was not an option (since it relies on trusted certificates):

  • Application needs a truststore with imported server certificate

Notes and tricks

Used code examples

What URL
pom.xml https://javabydeveloper.com/junit-5-maven-example/

About

Create secure connections whithout requirement of certificates and key stores.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages