1
0
mirror of https://github.com/falk-werner/webfuse synced 2024-10-27 20:34:10 +00:00
falk-werner_webfuse/include/webfuse/adapter/client_tlsconfig.h

70 lines
2.3 KiB
C
Raw Normal View History

2020-06-14 12:17:36 +00:00
////////////////////////////////////////////////////////////////////////////////
/// \file adapter/client_tslconfig.h
/// \brief Configuration of TLS (Transport Layer Security) for adapter clients.
////////////////////////////////////////////////////////////////////////////////
2020-06-11 16:07:42 +00:00
#ifndef WF_ADAPTER_CLIENT_TLSCONFIG_H
#define WF_ADAPTER_CLIENT_TLSCONFIG_H
#include <webfuse/adapter/api.h>
#ifdef __cplusplus
extern "C"
{
#endif
2020-06-14 12:17:36 +00:00
//------------------------------------------------------------------------------
/// \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
//------------------------------------------------------------------------------
2020-06-11 16:07:42 +00:00
struct wf_client_tlsconfig;
2020-06-14 12:17:36 +00:00
//------------------------------------------------------------------------------
/// \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).
//------------------------------------------------------------------------------
2020-06-11 16:07:42 +00:00
extern WF_API void
wf_client_tlsconfig_set_keypath(
struct wf_client_tlsconfig * config,
char const * key_path);
2020-06-14 12:17:36 +00:00
//------------------------------------------------------------------------------
/// \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).
//------------------------------------------------------------------------------
2020-06-11 16:07:42 +00:00
extern WF_API void
wf_client_tlsconfig_set_certpath(
struct wf_client_tlsconfig * config,
char const * cert_path);
2020-06-14 12:17:36 +00:00
//------------------------------------------------------------------------------
/// \brief Sets the path the CA file.
///
/// \param config Pointer to the config.
/// \param cafile_path Path to CA file (in PEM format).
//------------------------------------------------------------------------------
2020-06-11 16:07:42 +00:00
extern WF_API void
wf_client_tlsconfig_set_cafilepath(
struct wf_client_tlsconfig * config,
char const * cafile_path);
#ifdef __cplusplus
}
#endif
#endif