curl-fuzzer C++ reference
Loading...
Searching...
No Matches
tls_test_credential_cache.h File Reference

Installs cached test credentials into fresh TLS contexts. More...

Go to the source code of this file.

Functions

bool proto_fuzzer::InstallCachedTlsTestCredentials (SSL_CTX *context, curl::fuzzer::proto::TlsCertificateChainProfile certificate_chain)
 Install references to immutable, process-lifetime test credentials in one fresh TLS context.

Detailed Description

Installs cached test credentials into fresh TLS contexts.

Definition in file tls_test_credential_cache.h.

Function Documentation

◆ InstallCachedTlsTestCredentials()

bool proto_fuzzer::InstallCachedTlsTestCredentials ( SSL_CTX * context,
curl::fuzzer::proto::TlsCertificateChainProfile certificate_chain )

Install references to immutable, process-lifetime test credentials in one fresh TLS context.

SSL_CTX_use_certificate and SSL_CTX_use_PrivateKey retain their own references. Each extra-chain insertion receives an explicit X509_up_ref because SSL_CTX_add_extra_chain_cert takes ownership on success. No session, connection, callback, or observation state is shared.

Parameters
contextFresh server context that will own the installed references.
certificate_chainChecked-in auxiliary certificate profile to use.
Returns
true when the leaf, key, and selected chain were installed.

Definition at line 154 of file tls_test_credential_cache.cc.