Github Repository
Example Project

oatpp-libressl - extension of oatpp module.
It provides secure server and client connection providers for oatpp applications. Based on LibreSSL.
Supports both "Simple" and "Async" oatpp APIs.


  • LibreSSL - minimum version 3.0.0


See: Full example project TLS-Libressl

Create server connection provider

#include "oatpp-libressl/server/ConnectionProvider.hpp"
#include "oatpp-libressl/Config.hpp"


const char* crtFile = "path/to/file.crt";
const char* pemFile = "path/to/file.pem";

auto config = oatpp::libressl::Config::createDefaultServerConfigShared(crtFile, pemFile /* private key */);
auto connectionProvider = oatpp::libressl::server::ConnectionProvider::createShared(config, 8443);

Create client connection provider

#include "oatpp-libressl/client/ConnectionProvider.hpp"
#include "oatpp-libressl/Config.hpp"


auto config = oatpp::libressl::Config::createShared();
auto connectionProvider = oatpp::libressl::client::ConnectionProvider::createShared(config, "httpbin.org", 443);

Don't forget!

Set libressl lockingCallback and SIGPIPE handler on program start!

#include "oatpp-libressl/Callbacks.hpp"


/* set lockingCallback for libressl */

#include <csignal>


/* ignore SIGPIPE */
std::signal(SIGPIPE, SIG_IGN);

See more