Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oatpp/oatpp-openssl
OpenSSL adaptor for Oat++ applications
https://github.com/oatpp/oatpp-openssl
cpp oatpp openssl tls
Last synced: 4 days ago
JSON representation
OpenSSL adaptor for Oat++ applications
- Host: GitHub
- URL: https://github.com/oatpp/oatpp-openssl
- Owner: oatpp
- License: apache-2.0
- Created: 2020-01-29T18:28:54.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-05-19T22:36:33.000Z (6 months ago)
- Last Synced: 2024-10-29T22:54:01.690Z (16 days ago)
- Topics: cpp, oatpp, openssl, tls
- Language: C++
- Homepage: https://oatpp.io/
- Size: 131 KB
- Stars: 14
- Watchers: 3
- Forks: 23
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# oatpp-openssl [![Build Status](https://dev.azure.com/lganzzzo/lganzzzo/_apis/build/status/oatpp.oatpp-openssl?branchName=master)](https://dev.azure.com/lganzzzo/lganzzzo/_build/latest?definitionId=32&branchName=master)
This submodule provides secure server and client connection providers for oatpp applications. Based on OpenSSL.
More about oat++:
- Website: [https://oatpp.io](https://oatpp.io)## Requires
OpenSSL installed.
### Create server connection provider
```cpp
#include "oatpp-openssl/server/ConnectionProvider.hpp"
#include "oatpp-openssl/Config.hpp"...
const char* pemFile = "path/to/file.pem";
const char* crtFile = "path/to/file.crt";auto config = oatpp::openssl::Config::createDefaultServerConfigShared(pemFile, crtFile);
auto connectionProvider = oatpp::openssl::server::ConnectionProvider::createShared(config, {"localhost", 443});```
### Create client connection provider
```cpp
#include "oatpp-openssl/client/ConnectionProvider.hpp"
#include "oatpp-openssl/Config.hpp"
#include "oatpp-openssl/configurer/TrustStore.hpp"...
const char* trust = "path/to/truststore";
auto config = oatpp::openssl::Config::createDefaultClientConfigShared();
config->addContextConfigurer(std::make_shared(trust, nullptr));
auto connectionProvider = oatpp::openssl::client::ConnectionProvider::createShared(config, {"httpbin.org", 443});```