testcontainers-cpp 0.2.0
Native C++20 Testcontainers over the Docker Engine API
Loading...
Searching...
No Matches
testcontainers::TlsMaterials Struct Reference

TLS material paths attached to a resolved endpoint — filled by DockerHost::resolve() when the active docker context stores them (~/.docker/contexts/tls/...). More...

#include <testcontainers/docker/DockerHost.hpp>

Public Attributes

std::string ca_cert
 CA bundle (PEM); empty when the context has none.
std::string client_cert
 client certificate (PEM, mutual TLS); empty when none
std::string client_key
 client private key (PEM, mutual TLS); empty when none
bool verify = false
 Verify the server certificate against ca_cert.

Detailed Description

TLS material paths attached to a resolved endpoint — filled by DockerHost::resolve() when the active docker context stores them (~/.docker/contexts/tls/...).

When present, the TLS transport uses exactly these files and this verify mode; otherwise (env-driven endpoints) the DOCKER_CERT_PATH / DOCKER_TLS_VERIFY environment configures TLS.

Member Data Documentation

◆ ca_cert

std::string testcontainers::TlsMaterials::ca_cert

CA bundle (PEM); empty when the context has none.

◆ client_cert

std::string testcontainers::TlsMaterials::client_cert

client certificate (PEM, mutual TLS); empty when none

◆ client_key

std::string testcontainers::TlsMaterials::client_key

client private key (PEM, mutual TLS); empty when none

◆ verify

bool testcontainers::TlsMaterials::verify = false

Verify the server certificate against ca_cert.

Gated on the store actually holding a ca.pem: a context with only the client pair presents it without server verification (there is no trust anchor to check against), as does one whose meta sets SkipTLSVerify.