Skip to content

Mbed TLS platform

«interface»SolidSyslogStreamMbedTlsStreamMbedTls«interface»SolidSyslogStream

Struct SolidSyslogMbedTlsStreamConfig

ClassList > SolidSyslogMbedTlsStreamConfig

  • #include <SolidSyslogMbedTlsStream.h>
struct SolidSyslogMbedTlsStreamConfig
{
    struct SolidSyslogStream* Transport;
    SolidSyslogSleepFunction Sleep;
    SolidSyslogTlsHandshakeTimeoutFunction GetHandshakeTimeoutMs;
    void* HandshakeTimeoutContext;
    struct mbedtls_ctr_drbg_context* Rng;
    struct mbedtls_x509_crt* CaChain;
    const char* ServerName;
    struct mbedtls_x509_crt* ClientCertChain;
    struct mbedtls_pk_context* ClientKey;
};

Public Attributes Documentation

CaChain

Trust anchors the peer cert must chain to; caller-built and owned.

struct mbedtls_x509_crt* SolidSyslogMbedTlsStreamConfig::CaChain;


ClientCertChain

mTLS leaf (+ intermediates); caller-owned.

struct mbedtls_x509_crt* SolidSyslogMbedTlsStreamConfig::ClientCertChain;

NULL (or a NULL ClientKey) disables mTLS - both must be set to present a client cert.


ClientKey

Private key matching ClientCertChain; caller-owned.

struct mbedtls_pk_context* SolidSyslogMbedTlsStreamConfig::ClientKey;

NULL disables mTLS.


GetHandshakeTimeoutMs

Per-attempt handshake deadline in ms; NULL uses the SOLIDSYSLOG_TLS_HANDSHAKE_TIMEOUT_MS tunable.

SolidSyslogTlsHandshakeTimeoutFunction SolidSyslogMbedTlsStreamConfig::GetHandshakeTimeoutMs;


HandshakeTimeoutContext

Passed back to GetHandshakeTimeoutMs unchanged; NULL is fine.

void* SolidSyslogMbedTlsStreamConfig::HandshakeTimeoutContext;


Rng

Seeded CTR-DRBG for the handshake; caller-built and caller-owned.

struct mbedtls_ctr_drbg_context* SolidSyslogMbedTlsStreamConfig::Rng;


ServerName

SNI + peer-identity check.

const char* SolidSyslogMbedTlsStreamConfig::ServerName;

A non-empty name is verified against the peer cert (SAN/CN). NULL connects chain-only but emits a WARNING - the peer is unverified (MITM-class). "" is the no-name-check opt-out (closed network / private CA): the cert must still chain to CaChain, but the endpoint identity is not checked; no diagnostic.


Sleep

Bridges the WANT_READ/WANT_WRITE polls of the bounded handshake retry; required - there is no fallback.

SolidSyslogSleepFunction SolidSyslogMbedTlsStreamConfig::Sleep;


Transport

Underlying byte stream the TLS records ride on.

struct SolidSyslogStream* SolidSyslogMbedTlsStreamConfig::Transport;

Borrowed - this stream may Close it but never destroys it; the caller owns it and must keep it valid until SolidSyslogMbedTlsStream_Destroy.



The documentation for this class was generated from the following file Platform/MbedTls/Interface/SolidSyslogMbedTlsStream.h