TlsLibrary

This library provides an API for creating basic SSL/TLS connections with standard Java Secure Socket Extension, JSSE.
The Library is implemented in Kotlin.
The Kotlin API is implemented with a "type-safe builder" approach, which is quite popular in the Groovy community.

Disclaimer: The current Version is not optimized for Java yet.

Motivation

If you also find it hard to use the complex JSSE structure to create your SSL sockets, which also generates lots of boilerplate when used directly, this tool is what you've been looking for.

The library provides means for creating SSLSocketFactories that can be used for most use cases where TLS/SSL connections are required. It's also supposed to provide usage examples and even sample implementations like SSL enabled servers, Apache HTTP Clients and others, which you can use directly in your application.

Demo of Kotlin DSL

In the following you can see some basic examples of using the Kotlin DSL for setting up ssl-(server)-socket-factories.

Creating a Client Socket for Mutual Authentication (Client Keystore must be provided):