# Config.hpp

This File On Github
Ask A Question

API: latest
module: oatpp-mbedtls
#include "oatpp-mbedtls/Config.hpp"

# Config

Wrapper over mbedtls_ssl_config.

namespace oatpp { namespace mbedtls { 
  class Config {}

# Methods

Return Type Name Summary
[none] Config Constructor.
[none] ~Config Non-virtual destructor.
std::shared_ptr<Config> createShared Create shared Config.
std::shared_ptr<Config> createDefaultServerConfigShared Create default server config.
std::shared_ptr<Config> createDefaultClientConfigShared Create default client config.
mbedtls_ssl_config* getTLSConfig Get underlying mbedtls_ssl_config.
mbedtls_entropy_context* getEntropy Get entropy.
mbedtls_ctr_drbg_context* getCTR_DRBG Get CTR_DRBG.
mbedtls_x509_crt* getServerCertificate Get server certificate.
mbedtls_x509_crt* getCAChain Get CA Chain.
mbedtls_pk_context* getPrivateKey Get private key.
bool shouldThrowOnVerificationFailed Returns true if server certificate verification is required

# Config::Config



# Config::~Config

Non-virtual destructor.


# Config::createShared

Create shared Config.

  • @return - std::shared_ptr to Config.

static std::shared_ptr<Config> createShared()

# Config::createDefaultServerConfigShared

Create default server config.

  • @param serverCertFile - server certificate.
  • @param privateKeyFile - private key.
  • @param pkPassword - optional private key password.
  • @return - std::shared_ptr to Config.

static std::shared_ptr<Config> createDefaultServerConfigShared(const char* serverCertFile, const char* privateKeyFile, const char* pkPassword = nullptr)

# Config::createDefaultClientConfigShared

Create default client config.

  • @param throwOnVerificationFailed - throw error on server certificate
  • @param caRootCertFile - path to the CA Root certificate to verificate against
  • @return - std::shared_ptr to Config.

static std::shared_ptr<Config> createDefaultClientConfigShared(bool throwOnVerificationFailed = false, const char* caRootCertFile = nullptr)

# Config::getTLSConfig

Get underlying mbedtls_ssl_config.

  • @return - mbedtls_ssl_config*.

mbedtls_ssl_config* getTLSConfig()

# Config::getEntropy

Get entropy.

  • @return - mbedtls_entropy_context*

mbedtls_entropy_context* getEntropy()

# Config::getCTR_DRBG


  • @return - mbedtls_ctr_drbg_context*

mbedtls_ctr_drbg_context* getCTR_DRBG()

# Config::getServerCertificate

Get server certificate.

  • @return - mbedtls_x509_crt*

mbedtls_x509_crt* getServerCertificate()

# Config::getCAChain

Get CA Chain.

  • @return - mbedtls_x509_crt*

mbedtls_x509_crt* getCAChain()

# Config::getPrivateKey

Get private key.

  • @return - mbedtls_pk_context*

mbedtls_pk_context* getPrivateKey()

# Config::shouldThrowOnVerificationFailed

Returns true if server certificate verification is required

  • @return - bool

bool shouldThrowOnVerificationFailed()