Skip to content

Mbed TLS platform

«interface»SolidSyslogMbedTlsCredentialsMbedTlsPemBufferCredentialsMbedTls

File SolidSyslogMbedTlsPemBufferCredentials.h

FileList > Interface > SolidSyslogMbedTlsPemBufferCredentials.h

  • #include <stddef.h>
  • #include "SolidSyslogExternC.h"

Classes

Type Name
struct SolidSyslogMbedTlsPemBuffer
PEM text and its extent.
struct SolidSyslogMbedTlsPemBufferCredentialsConfig
Where this backend's material lives.

Detailed Description

An Mbed TLS credentials backend that parses PEM held in memory, for the duration of one connection.

Where the handle backend asks the integrator to keep parsed material alive, this one parses on Install and releases on Close, so between connections nothing but the integrator's own PEM is in memory. The PEM may live in read-only flash, or be fetched into a buffer the integrator wipes itself; this library copies none of it.

What Release frees, Mbed TLS wipes: mbedtls_pk_free zeroises the key context and every limb of the private key, and mbedtls_x509_crt_free zeroises the DER it decoded.

Public Functions Documentation

SolidSyslogMbedTlsPemBufferCredentials_Create

Draw a credentials instance from the pool.

struct SolidSyslogMbedTlsCredentials * SolidSyslogMbedTlsPemBufferCredentials_Create (
    const struct SolidSyslogMbedTlsPemBufferCredentialsConfig * config
) 

A NULL config or a NULL Rng is reported and falls back to the shared Null credentials, as does an exhausted pool.

One instance serves one connection at a time, because it parses into storage of its own. Wire a second instance for a second stream: a stream that opens while another still holds this source is reported and its attempt fails, rather than parsing over material the live connection is using. The sender retries, so it connects once the first stream closes.


SolidSyslogMbedTlsPemBufferCredentials_Destroy

Release the pool slot, freeing any material still parsed into it.

void SolidSyslogMbedTlsPemBufferCredentials_Destroy (
    struct SolidSyslogMbedTlsCredentials * base
) 



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