All Projects → apple → Swift Nio Ssl

apple / Swift Nio Ssl

Licence: apache-2.0
TLS Support for SwiftNIO, based on BoringSSL.

Programming Languages

swift
15916 projects

Labels

Projects that are alternatives of or similar to Swift Nio Ssl

istio-csr
istio-csr is an agent that allows for Istio workload and control plane components to be secured using cert-manager.
Stars: ✭ 81 (-71.07%)
Mutual labels:  tls
insecure
Secure your dev servers, insecurely!
Stars: ✭ 41 (-85.36%)
Mutual labels:  tls
Oscrypto
Compiler-free Python crypto library backed by the OS, supporting CPython and PyPy
Stars: ✭ 257 (-8.21%)
Mutual labels:  tls
letsencrypt-www
Probably the easiest way to create | renew | deploy certificate
Stars: ✭ 27 (-90.36%)
Mutual labels:  tls
openssl-certificate-authority-guide
Bu kılavuz, OpenSSL komut satırı araçlarını kullanarak kendi sertifika yetkilinizi (CA) kurup nasıl kullanacağınızı gösterir.
Stars: ✭ 17 (-93.93%)
Mutual labels:  tls
tls-perf
TLS handshakes benchnarking tool
Stars: ✭ 18 (-93.57%)
Mutual labels:  tls
static-web-server
A blazing fast and asynchronous web server for static files-serving. ⚡
Stars: ✭ 230 (-17.86%)
Mutual labels:  tls
Certificates
🛡️ A private certificate authority (X.509 & SSH) & ACME server for secure automated certificate management, so you can use TLS everywhere & SSO for SSH.
Stars: ✭ 3,693 (+1218.93%)
Mutual labels:  tls
proxy
A simple golang tcp proxy.
Stars: ✭ 101 (-63.93%)
Mutual labels:  tls
Mtproxy
MTProxyTLS一键安装绿色脚本
Stars: ✭ 256 (-8.57%)
Mutual labels:  tls
dtls
Datagram Transport Layer Security (DTLS) client.
Stars: ✭ 72 (-74.29%)
Mutual labels:  tls
extract-tls-secrets
Decrypt HTTPS/TLS connections on the fly with Wireshark
Stars: ✭ 226 (-19.29%)
Mutual labels:  tls
Ocaml Tls
TLS in pure OCaml
Stars: ✭ 254 (-9.29%)
Mutual labels:  tls
danetls
Program to test DANE enabled TLS Services
Stars: ✭ 18 (-93.57%)
Mutual labels:  tls
Mbedtls
An open source, portable, easy to use, readable and flexible SSL library
Stars: ✭ 3,282 (+1072.14%)
Mutual labels:  tls
freshcerts
ACME certificate protocol (Let's Encrypt) proxy client with a dashboard and monitoring
Stars: ✭ 59 (-78.93%)
Mutual labels:  tls
sbcOS
Barebone Opensource Powered SBC
Stars: ✭ 59 (-78.93%)
Mutual labels:  tls
Kubernetes Under The Hood
This tutorial is someone planning to install a Kubernetes cluster and wants to understand how everything fits together.
Stars: ✭ 279 (-0.36%)
Mutual labels:  tls
Firefly
Firefly is an asynchronous web framework for rapid development of high-performance web application.
Stars: ✭ 277 (-1.07%)
Mutual labels:  tls
Certainty
Automated cacert.pem management for PHP projects
Stars: ✭ 255 (-8.93%)
Mutual labels:  tls

SwiftNIO SSL

SwiftNIO SSL is a Swift package that contains an implementation of TLS based on BoringSSL. This package allows users of SwiftNIO to write protocol clients and servers that use TLS to secure data in flight.

The name is inspired primarily by the names of the library this package uses (BoringSSL), and not because we don't know the name of the protocol. We know the protocol is TLS!

To get started, check out the API docs.

Using SwiftNIO SSL

SwiftNIO SSL provides two ChannelHandlers to use to secure a data stream: the NIOSSLClientHandler and the NIOSSLServerHandler. Each of these can be added to a Channel to secure the communications on that channel.

Additionally, we provide a number of low-level primitives for configuring your TLS connections. These will be shown below.

To secure a server connection, you will need a X.509 certificate chain in a file (either PEM or DER, but PEM is far easier), and the associated private key for the leaf certificate. These objects can then be wrapped up in a TLSConfiguration object that is used to initialize the ChannelHandler.

For example:

let configuration = TLSConfiguration.forServer(certificateChain: try NIOSSLCertificate.fromPEMFile("cert.pem").map { .certificate($0) },
                                               privateKey: .file("key.pem"))
let sslContext = try NIOSSLContext(configuration: configuration)

let server = ServerBootstrap(group: group)
    .childChannelInitializer { channel in
        // important: The handler must be initialized _inside_ the `childChannelInitializer`
        let handler = try NIOSSLServerHandler(context: sslContext)

        [...]
        channel.pipeline.addHandler(handler)
        [...]
    }

For clients, it is a bit simpler as there is no need to have a certificate chain or private key (though clients may have these things). Setup for clients may be done like this:

let configuration = TLSConfiguration.forClient()
let sslContext = try NIOSSLContext(configuration: configuration)

let client = ClientBootstrap(group: group)
    .channelInitializer { channel in
        // important: The handler must be initialized _inside_ the `channelInitializer`
        let handler = try NIOSSLClientHandler(context: sslContext)

        [...]
        channel.pipeline.addHandler(handler)
        [...]
    }
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].