You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
2.3 KiB
70 lines
2.3 KiB
4 years ago
|
////////////////////////////////////////////////////////////////////////////////
|
||
4 years ago
|
/// \file webfuse/client_tslconfig.h
|
||
4 years ago
|
/// \brief Configuration of TLS (Transport Layer Security) for adapter clients.
|
||
|
////////////////////////////////////////////////////////////////////////////////
|
||
|
|
||
4 years ago
|
#ifndef WF_CLIENT_TLSCONFIG_H
|
||
|
#define WF_CLIENT_TLSCONFIG_H
|
||
4 years ago
|
|
||
4 years ago
|
#include <webfuse/api.h>
|
||
4 years ago
|
|
||
|
#ifdef __cplusplus
|
||
|
extern "C"
|
||
|
{
|
||
|
#endif
|
||
|
|
||
4 years ago
|
//------------------------------------------------------------------------------
|
||
|
/// \struct wf_client_tlsconfig
|
||
|
/// \brief TLS configuration of the client.
|
||
|
///
|
||
|
/// TLS configuration is queried during initialization of a client via
|
||
|
/// WF_CLIENT_GET_TLS_CONFIG event.
|
||
|
///
|
||
|
/// \see WF_CLIENT_GET_TLS_CONFIG
|
||
|
/// \see wf_client_create
|
||
|
//------------------------------------------------------------------------------
|
||
4 years ago
|
struct wf_client_tlsconfig;
|
||
|
|
||
4 years ago
|
//------------------------------------------------------------------------------
|
||
|
/// \brief Sets the path to the private key.
|
||
|
///
|
||
|
/// \note To enable TLS both, key_path and cert_path, must be specified.
|
||
|
///
|
||
|
/// \param config Pointer to config.
|
||
|
/// \param key_path Path to private key file (in PEM format).
|
||
|
//------------------------------------------------------------------------------
|
||
4 years ago
|
extern WF_API void
|
||
|
wf_client_tlsconfig_set_keypath(
|
||
|
struct wf_client_tlsconfig * config,
|
||
|
char const * key_path);
|
||
|
|
||
4 years ago
|
//------------------------------------------------------------------------------
|
||
|
/// \brief Sets the path to the clients certificate.
|
||
|
///
|
||
|
/// \note To enable TLS both, key_path and cert_path, must be specified.
|
||
|
///
|
||
|
/// \param config Pointer to the config.
|
||
|
/// \param cert_path Path the the clients certificate (in PEM format).
|
||
|
//------------------------------------------------------------------------------
|
||
4 years ago
|
extern WF_API void
|
||
|
wf_client_tlsconfig_set_certpath(
|
||
|
struct wf_client_tlsconfig * config,
|
||
|
char const * cert_path);
|
||
|
|
||
4 years ago
|
//------------------------------------------------------------------------------
|
||
|
/// \brief Sets the path the CA file.
|
||
|
///
|
||
|
/// \param config Pointer to the config.
|
||
|
/// \param cafile_path Path to CA file (in PEM format).
|
||
|
//------------------------------------------------------------------------------
|
||
4 years ago
|
extern WF_API void
|
||
|
wf_client_tlsconfig_set_cafilepath(
|
||
|
struct wf_client_tlsconfig * config,
|
||
|
char const * cafile_path);
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
}
|
||
|
#endif
|
||
|
|
||
|
#endif
|