All Projects → laudrup → boost-wintls

laudrup / boost-wintls

Licence: BSL-1.0 license
Native Windows TLS stream wrapper for use with boost::asio

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects
shell
77523 projects

Projects that are alternatives of or similar to boost-wintls

Beast
HTTP and WebSocket built on Boost.Asio in C++11
Stars: ✭ 3,241 (+13404.17%)
Mutual labels:  tls, ssl, boost, async-programming, asio
Chromium-Gost
Chromium с поддержкой алгоритмов ГОСТ
Stars: ✭ 286 (+1091.67%)
Mutual labels:  tls, ssl, sspi
XAsyncSockets
XAsyncSockets is an efficient Python/MicroPython library of managed asynchronous sockets.
Stars: ✭ 28 (+16.67%)
Mutual labels:  tls, ssl, async-programming
terraform-aws-acm-request-certificate
Terraform module to request an ACM certificate for a domain name and create a CNAME record in the DNS zone to complete certificate validation
Stars: ✭ 83 (+245.83%)
Mutual labels:  tls, ssl
Swiddler
TCP/UDP debugging tool.
Stars: ✭ 56 (+133.33%)
Mutual labels:  tls, ssl
tipi
Tipi - the All-in-one Web Server for Ruby Apps
Stars: ✭ 214 (+791.67%)
Mutual labels:  tls, ssl
docker-ssl-reverse-proxy
Easy-to-use auto-SSL reverse proxy as a Docker container based on Caddy and Let’s Encrypt
Stars: ✭ 22 (-8.33%)
Mutual labels:  tls, ssl
vault-pki-monitor-venafi
Venafi PKI Monitoring Secrets Engine for HashiCorp Vault that enforces security policy and provides certificate visiblity to the enterprise.
Stars: ✭ 18 (-25%)
Mutual labels:  tls, ssl
SimpleSockets
Asynchronous TCP .NET library with reliable transmission and receipt of data, with an ssl implementation.
Stars: ✭ 74 (+208.33%)
Mutual labels:  tls, ssl
hyper-proxy
A proxy connector for Hyper-based crates
Stars: ✭ 73 (+204.17%)
Mutual labels:  tls, ssl
sslcli
Pretty awesome command-line client for public SSLLabs API
Stars: ✭ 17 (-29.17%)
Mutual labels:  tls, ssl
python-mbedtls
Cryptographic library with an mbed TLS back end
Stars: ✭ 64 (+166.67%)
Mutual labels:  tls, ssl
steady-tun
Secure TLS tunnel with pool of prepared upstream connections
Stars: ✭ 37 (+54.17%)
Mutual labels:  tls, ssl
cryptonice
CryptoNice is both a command line tool and library which provides the ability to scan and report on the configuration of SSL/TLS for your internet or internal facing web services. Built using the sslyze API and ssl, http-client and dns libraries, cryptonice collects data on a given domain and performs a series of tests to check TLS configuration…
Stars: ✭ 91 (+279.17%)
Mutual labels:  tls, ssl
dheater
D(HE)ater is a proof of concept implementation of the D(HE)at attack (CVE-2002-20001) through which denial-of-service can be performed by enforcing the Diffie-Hellman key exchange.
Stars: ✭ 142 (+491.67%)
Mutual labels:  tls, ssl
safeminer
全网第一款本地连接矿池加密软件,隐藏本地ip、加密数据包、流量混淆,可实现防止被监管的目的
Stars: ✭ 8 (-66.67%)
Mutual labels:  tls, ssl
RabbitSSL
Example Java, Spring-Boot and Python RabbitMQ SSL configuration
Stars: ✭ 21 (-12.5%)
Mutual labels:  tls, ssl
Openssl
TLS/SSL and crypto library
Stars: ✭ 17,157 (+71387.5%)
Mutual labels:  tls, ssl
hudsucker
Intercepting HTTP/S proxy
Stars: ✭ 114 (+375%)
Mutual labels:  tls, ssl
SierraChartZorroPlugin
A Zorro broker API plugin for Sierra Chart, written in Win32 C++.
Stars: ✭ 22 (-8.33%)
Mutual labels:  boost, asio

Boost.Wintls Logo

Native Windows TLS stream for Boost.Asio

Support Ukraine

wintls.dev

Build Coverage Coverity Analysis
Build status Codecov Coverity Scan Build Status

Contents

Introduction

Implements a TLS stream wrapper for use with Boost.Asio similar to Boost.Asio.SSL but using native Windows API (SSPI/Schannel) functionality instead of OpenSSL for providing TLS encrypted stream functionality.

Requirements

As this library uses Windows specific libraries, it is only supported on Microsoft Windows although it is intended to be used alongside the existing Boost.Asio.SSL implementation.

Boost is required. Currently tested with Boost 1.75 to 1.79 but most newer versions ought to work.

A working C++ compiler supporting the C++14 standard is required. Currently tested compilers are:

  • MSVC for Visual Studio 2022
  • MSVC for Visual Studio 2019
  • Clang
  • MinGW64 (GCC)

Only 64 bit builds have been tested.

Building

Boost.Wintls is header-only. To use it just add the necessary #include line to your source files, like this:

#include <boost/wintls.hpp>

CMake may be used to generate a Visual Studio solution for building the tests and examples, e.g.:

mkdir build
cd build
cmake ..
cmake --build .

If the provided CMake scripts are not used and you are using the MinGW64 compiler the crypt32, secur32, ws2_32 and wsock32 libraries needs to be linked with your libraries/executables.

Quickstart

Similar to Boost.Asio.SSL a boost::wintls::context is required to hold certificates and options to use for the TLS stream:

    // Set up context to use the systems default TLS methods (e.g. TLS 1.2)
    boost::wintls::context ctx{boost::wintls::method::system_default};

Using that context a boost::wintls::stream can be constructed using a boost::asio::io_context specifying the underlying stream type (most often a TCP stream):

    boost::asio::io_context ioc;

    boost::wintls::stream<boost::asio::ip::tcp::socket> stream(ioc, ctx);

Although that is all that is required to construct a stream that fully supports the standard boost::asio stream operations like write or async_read the underlying stream probably needs to be connected, a handshake has to be performed and most likely, certificates and keys has to be handled as well.

For details on how to do that, please see the documentation and the examples

Documentation

Documentation is available here.

Contributing

Pull requests, issue reporting etc. are very much welcome.

If you use this library and find it useful, I would love to know. You should also consider donating to one of the funds that help victims of the war in Ukraine:

https://www.stopputin.net/

Thanks

  • Vinnie Falco For encouraging me to write this library in the first place as well as code reviews and other useful input.
  • Richard Hodges For code reviews and other useful input.
  • Damian Jarek For code reviews and other useful input.
  • Marcelo Zimbres For coming up with the short and descriptive name for this library
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].