TLSService mini-release

It would also be a good idea to test out this TLS library with the HTTP
work that is being done right now.


From: Gelareh Taban via swift-server-dev <>
Date: 06/28/2017 12:40 PM
Subject: [swift-server-dev] TLSService mini-release
Sent by:

Hi all,

A quick update on TLS library update.

I have an implementation of the protocol proposed earlier:

I have spoken with Tanner Nelson about this proposal and its integration
into Vapor. This led to some discussion on an alternative protocol proposal
that hopefully will be followed up on!

For now, I would like to throw this code out for public review. Please
review below and let's look at what needs to get done.

The protocols are defined in:

There are 2 protocols: Connection and TLSService.
- Connection abstracts away the connection protocol, eg socket and defines
what we need from the connection end point.
- TLSService defines the TLS behavior.

The implementation of the TLSService protocol (using OpenSSL and
SecureTransport) is:

For tests, I needed a transport layer and since we are constrained by SPM's
lack of test-only dependencies, I had to include the socket dependency.
However this would have caused problems when people import TLSService so I
created a Release branch, removed the socket dependency and tagged that at

The implementation of the Connection protocol using BlueSocket and Ckit is
GitHub - gtaban/BlueSocket: Socket framework for Swift using the Swift Package Manager. Works on iOS, macOS, and Linux. (TLSService branch)
GitHub - gtaban/CKit: Friendly Pointer and Object-Oriented System API.

Although right now I use BlueSocket for tests, I have Ckit more or less
working as well and will integrate soon. Please open issues for any bugs,
missing features, etc:

Shout out to Bill Abt for writing the original SSLService which this is
based on.

Looking forward to everyone

swift-server-dev mailing list