TLSUV is a cross-platform library allowing asynchronous TLS communication. This is done by combinining libuv with mbedTLS or OpenSSL (see below for using other TLS implementations)
- async TLS over TCP
- flexible TLS engine support
- HTTP and websocket clients
- pkcs#11 support with default(OpenSSL) engine
API is attempted to be consistent with libuv API
- Linux
- Darwin/MacOS
- Windows
The simplest way to integrate tlsuv
in your project is to include it in your CMake build
with FetchContent
FetchContent_Declare(tlsuv
GIT_REPOSITORY https://github.com/openziti/tlsuv.git
GIT_TAG v0.29.5 # use latest release version
)
FetchContent_MakeAvailable(tlsuv)
target_link_libraries(your_app PRIVATE tlsuv)
HTTP support is a selectable feature (ON by default) and can be disabled by adding -DTLSUV_HTTP=OFF
during CMake
configuration step. This will also reduce dependencies list.
TLSUV depends on the following libraries:
Library | Notes |
---|---|
libuv | |
TLS | OpenSSL(default) or mbedTLS( TLSUV_TLSLIB=mbedtls ). Some features are only available with OpenSSL |
llhttp | only with HTTP enabled |
zlib | only with HTTP enabled |
CMake configuration process will attempt to resolve the above dependencies via find_package()
it is up to consuming project
to provide them.
If either of two TLS library options are not working for, there is a mechanism to dynamically provide TLS implementation.
For example, you're already using another TLS library for your project, there is a way to use it inside tlsuv. Two API interfaces are defined for that purpose:
tls_context
is roughly equivalent tombedtls_ssl_config
orSSL_CTX
in OpenSSL and is used to create instances oftls_engine
for individual connectionstls_engine
is an object for handling handshake and encryption for a single connection. Similar in purpose tombedtls_ssl_ctx
orSSL
in OpenSSL
See development instruction for building this project standalone for checking out samples, or contributing.
Please use these community resources for getting help. We use GitHub issues for tracking bugs and feature requests and have limited bandwidth to address them.
Copyright© 2018-2024. NetFoundry, Inc.