C++ Server-Side SDK
LaunchDarkly SDK
Typedefs | Functions
builder.h File Reference
#include <launchdarkly/server_side/bindings/c/config/config.h>
#include <launchdarkly/server_side/bindings/c/config/fdv2_builder/fdv2_builder.h>
#include <launchdarkly/server_side/bindings/c/config/lazy_load_builder/lazy_load_builder.h>
#include <launchdarkly/server_side/bindings/c/hook.h>
#include <launchdarkly/bindings/c/config/logging_builder.h>
#include <launchdarkly/bindings/c/export.h>
#include <launchdarkly/bindings/c/status.h>
#include <stdbool.h>
#include <stddef.h>
Include dependency graph for builder.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct _LDServerConfigBuilder * LDServerConfigBuilder
 
typedef struct _LDServerDataSourceStreamBuilder * LDServerDataSourceStreamBuilder
 
typedef struct _LDServerDataSourcePollBuilder * LDServerDataSourcePollBuilder
 
typedef struct _LDServerHttpPropertiesTlsBuilder * LDServerHttpPropertiesTlsBuilder
 

Functions

 LDServerConfigBuilder_New (char const *sdk_key)
 
 LDServerConfigBuilder_ServiceEndpoints_PollingBaseURL (LDServerConfigBuilder b, char const *url)
 
 LDServerConfigBuilder_ServiceEndpoints_StreamingBaseURL (LDServerConfigBuilder b, char const *url)
 
 LDServerConfigBuilder_ServiceEndpoints_EventsBaseURL (LDServerConfigBuilder b, char const *url)
 
 LDServerConfigBuilder_ServiceEndpoints_RelayProxyBaseURL (LDServerConfigBuilder b, char const *url)
 
 LDServerConfigBuilder_AppInfo_Identifier (LDServerConfigBuilder b, char const *app_id)
 
 LDServerConfigBuilder_AppInfo_Version (LDServerConfigBuilder b, char const *app_version)
 
 LDServerConfigBuilder_Offline (LDServerConfigBuilder b, bool offline)
 
 LDServerConfigBuilder_Events_Enabled (LDServerConfigBuilder b, bool enabled)
 
 LDServerConfigBuilder_Events_ContextKeysCapacity (LDServerConfigBuilder b, size_t context_keys_capacity)
 
 LDServerConfigBuilder_Events_Capacity (LDServerConfigBuilder b, size_t capacity)
 
 LDServerConfigBuilder_Events_FlushIntervalMs (LDServerConfigBuilder b, unsigned int milliseconds)
 
 LDServerConfigBuilder_Events_AllAttributesPrivate (LDServerConfigBuilder b, bool all_attributes_private)
 
 LDServerConfigBuilder_Events_PrivateAttribute (LDServerConfigBuilder b, char const *attribute_reference)
 
 LDServerConfigBuilder_DataSystem_BackgroundSync_Streaming (LDServerConfigBuilder b, LDServerDataSourceStreamBuilder stream_builder)
 
 LDServerConfigBuilder_DataSystem_BackgroundSync_Polling (LDServerConfigBuilder b, LDServerDataSourcePollBuilder poll_builder)
 
 LDServerConfigBuilder_DataSystem_LazyLoad (LDServerConfigBuilder b, LDServerLazyLoadBuilder lazy_load_builder)
 
 LDServerConfigBuilder_DataSystem_FDv2 (LDServerConfigBuilder b, LDServerFDv2Builder fdv2_builder)
 
 LDServerConfigBuilder_DataSystem_Enabled (LDServerConfigBuilder b, bool enabled)
 
 LDServerDataSourceStreamBuilder_New ()
 
 LDServerDataSourceStreamBuilder_InitialReconnectDelayMs (LDServerDataSourceStreamBuilder b, unsigned int milliseconds)
 
 LDServerDataSourceStreamBuilder_Filter (LDServerDataSourceStreamBuilder b, char const *filter_key)
 
 LDServerDataSourceStreamBuilder_Free (LDServerDataSourceStreamBuilder b)
 
 LDServerDataSourcePollBuilder_New ()
 
 LDServerDataSourcePollBuilder_IntervalS (LDServerDataSourcePollBuilder b, unsigned int seconds)
 
 LDServerDataSourcePollBuilder_Filter (LDServerDataSourcePollBuilder b, char const *filter_key)
 
 LDServerDataSourcePollBuilder_Free (LDServerDataSourcePollBuilder b)
 
 LDServerConfigBuilder_HttpProperties_WrapperName (LDServerConfigBuilder b, char const *wrapper_name)
 
 LDServerConfigBuilder_HttpProperties_WrapperVersion (LDServerConfigBuilder b, char const *wrapper_version)
 
 LDServerConfigBuilder_HttpProperties_Header (LDServerConfigBuilder b, char const *key, char const *value)
 
 LDServerConfigBuilder_HttpProperties_Tls (LDServerConfigBuilder b, LDServerHttpPropertiesTlsBuilder tls_builder)
 
 LDServerHttpPropertiesTlsBuilder_New (void)
 
 LDServerHttpPropertiesTlsBuilder_Free (LDServerHttpPropertiesTlsBuilder b)
 
 LDServerHttpPropertiesTlsBuilder_SkipVerifyPeer (LDServerHttpPropertiesTlsBuilder b, bool skip_verify_peer)
 
 LDServerHttpPropertiesTlsBuilder_CustomCAFile (LDServerHttpPropertiesTlsBuilder b, char const *custom_ca_file)
 
 LDServerConfigBuilder_HttpProperties_Proxy (LDServerConfigBuilder b, char const *proxy_url)
 
 LDServerConfigBuilder_Logging_Disable (LDServerConfigBuilder b)
 
 LDServerConfigBuilder_Logging_Basic (LDServerConfigBuilder b, LDLoggingBasicBuilder basic_builder)
 
 LDServerConfigBuilder_Logging_Custom (LDServerConfigBuilder b, LDLoggingCustomBuilder custom_builder)
 
 LDServerConfigBuilder_Hooks (LDServerConfigBuilder builder, struct LDServerSDKHook hook)
 
 LDServerConfigBuilder_Build (LDServerConfigBuilder builder, LDServerConfig *out_config)
 
 LDServerConfigBuilder_Free (LDServerConfigBuilder builder)
 

Function Documentation

◆ LDServerConfigBuilder_AppInfo_Identifier()

LDServerConfigBuilder_AppInfo_Identifier ( LDServerConfigBuilder  b,
char const *  app_id 
)

Sets an identifier for the application.

Parameters
bServer config builder. Must not be NULL.
app_idNon-empty string. Must be <= 64 chars. Must be alphanumeric, '-', '.', or '_'. Must not be NULL.

◆ LDServerConfigBuilder_AppInfo_Version()

LDServerConfigBuilder_AppInfo_Version ( LDServerConfigBuilder  b,
char const *  app_version 
)

Sets a version for the application.

Parameters
bServer config builder. Must not be NULL.
app_versionNon-empty string. Must be <= 64 chars. Must be alphanumeric, '-', '.', or '_'. Must not be NULL.

◆ LDServerConfigBuilder_Build()

LDServerConfigBuilder_Build ( LDServerConfigBuilder  builder,
LDServerConfig *  out_config 
)

Creates an LDClientConfig. The builder is automatically freed.

WARNING: Do not call any other LDServerConfigBuilder function on the provided LDServerConfigBuilder after calling this function. It is undefined behavior.

On success, the config will be stored in out_config; otherwise, out_config will be set to NULL and the returned LDStatus will indicate the error.

Parameters
builderBuilder to consume. Must not be NULL.
out_configPointer to where the built config will be stored. Must not be NULL.
Returns
Error status on failure.

◆ LDServerConfigBuilder_DataSystem_BackgroundSync_Polling()

LDServerConfigBuilder_DataSystem_BackgroundSync_Polling ( LDServerConfigBuilder  b,
LDServerDataSourcePollBuilder  poll_builder 
)

Configures the Background Sync data system with a Polling synchronizer. The builder is automatically freed.

WARNING: Do not call any other LDServerDataSourcePollBuilder function on the provided LDServerDataSourcePollBuilder after calling this function. It is undefined behavior.

This synchronizer may be chosen to override the default Streaming mode.

In this mode, the SDK makes periodic network requests to LaunchDarkly. Between requests, flag data may be stale to some degree. This mode may be advantageous if a streaming connection cannot be maintained.

Parameters
bServer config builder. Must not be NULL.
poll_builderThe polling builder. The builder is consumed; do not free it. Must not be NULL.

◆ LDServerConfigBuilder_DataSystem_BackgroundSync_Streaming()

LDServerConfigBuilder_DataSystem_BackgroundSync_Streaming ( LDServerConfigBuilder  b,
LDServerDataSourceStreamBuilder  stream_builder 
)

Configures the Background Sync data system with a Streaming synchronizer. The builder is automatically freed.

WARNING: Do not call any other LDServerDataSourceStreamBuilder function on the provided LDServerDataSourceStreamBuilder after calling this function. It is undefined behavior.

This is the default data system configuration for the SDK.

In this mode, the SDK maintains a persistent, streaming data connection with LaunchDarkly. The application is able to evaluate using the most recent flag configurations, since any changes are streamed from LaunchDarkly in the background.

Parameters
bServer config builder. Must not be NULL.
stream_builderThe streaming builder. The builder is consumed; do not free it. Must not be NULL.

◆ LDServerConfigBuilder_DataSystem_Enabled()

LDServerConfigBuilder_DataSystem_Enabled ( LDServerConfigBuilder  b,
bool  enabled 
)

Specify if the SDK's data system should be enabled or not.

If disabled, the SDK won't be able to obtain flag configuration and will instead serve application-provided default values.

Parameters
bServer config builder. Must not be NULL.
enabledTrue to enable the data system, false to disable it.

◆ LDServerConfigBuilder_DataSystem_FDv2()

LDServerConfigBuilder_DataSystem_FDv2 ( LDServerConfigBuilder  b,
LDServerFDv2Builder  fdv2_builder 
)

Configures the FDv2 data system. The builder is automatically consumed.

This method is mutually exclusive with the BackgroundSync_Streaming, BackgroundSync_Polling, and LazyLoad builders.

WARNING: Do not call any other LDServerFDv2Builder function on the provided builder after calling this function. It is undefined behavior.

FDv2 receives flag delivery updates over the changeset-based protocol with built-in fallback and recovery semantics. An optional FDv1 fallback may be configured on the FDv2 builder for service-directed protocol fallback.

Parameters
bServer config builder. Must not be NULL.
fdv2_builderThe FDv2 builder. The builder is consumed; do not free it. Must not be NULL.

◆ LDServerConfigBuilder_DataSystem_LazyLoad()

LDServerConfigBuilder_DataSystem_LazyLoad ( LDServerConfigBuilder  b,
LDServerLazyLoadBuilder  lazy_load_builder 
)

Configures the Lazy Load data system. The builder is automatically consumed.

This method is mutually exclusive with the BackgroundSync_Polling and BackgroundSync_Streaming builders.

WARNING: Do not call any other LDServerLazyLoadBuilder function on the provided LDServerLazyLoadBuilder after calling this function. It is undefined behavior.

In this mode the SDK will query a data source on-demand as required, with an in-memory cache to reduce the number of queries.

Parameters
bServer config builder. Must not be NULL.
lazy_load_builderThe lazy load builder. The builder is consumed; do not free it. Must not be NULL.

◆ LDServerConfigBuilder_Events_AllAttributesPrivate()

LDServerConfigBuilder_Events_AllAttributesPrivate ( LDServerConfigBuilder  b,
bool  all_attributes_private 
)

Attribute privacy indicates whether or not attributes should be retained by LaunchDarkly after being sent upon initialization, and if attributes should later be sent in events.

Attribute privacy may be specified in 3 ways:

(1) To specify that all attributes should be considered private - not just those designated private on a per-context basis - call this method with true as the parameter.

(2) To specify that a specific set of attributes should be considered private - in addition to those designated private on a per-context basis

  • call PrivateAttribute.

(3) To specify private attributes on a per-context basis, it is not necessary to call either of these methods, as the default behavior is to treat all attributes as non-private unless otherwise specified.

Parameters
bServer config builder. Must not be NULL.
all_attributes_privateTrue for behavior of (1), false for default behavior of (2) or (3).

◆ LDServerConfigBuilder_Events_Capacity()

LDServerConfigBuilder_Events_Capacity ( LDServerConfigBuilder  b,
size_t  capacity 
)

Sets the capacity of the event processor. When more events are generated within the processor's flush interval than this value, events will be dropped.

Parameters
bServer config builder. Must not be NULL.
capacityEvent queue capacity.

◆ LDServerConfigBuilder_Events_ContextKeysCapacity()

LDServerConfigBuilder_Events_ContextKeysCapacity ( LDServerConfigBuilder  b,
size_t  context_keys_capacity 
)

Specifies the number of unique context keys that can be remembered by the index event generation logic before needing to evict keys from memory in LRU order.

After reaching capacity, it's possible that a previously-indexed context may cause generation of a redundant index event.

Parameters
bServer config builder. Must not be NULL.
context_keys_capacityMaximum unique context keys to remember. The default is 1000.

◆ LDServerConfigBuilder_Events_Enabled()

LDServerConfigBuilder_Events_Enabled ( LDServerConfigBuilder  b,
bool  enabled 
)

Specify if event-sending should be enabled or not. By default, events are enabled.

Parameters
bServer config builder. Must not be NULL.
enabledTrue to enable event-sending.

◆ LDServerConfigBuilder_Events_FlushIntervalMs()

LDServerConfigBuilder_Events_FlushIntervalMs ( LDServerConfigBuilder  b,
unsigned int  milliseconds 
)

Sets the flush interval of the event processor. The processor queues outgoing events based on the capacity parameter; these events are then delivered based on the flush interval.

Parameters
bServer config builder. Must not be NULL.
millisecondsInterval between automatic flushes.

◆ LDServerConfigBuilder_Events_PrivateAttribute()

LDServerConfigBuilder_Events_PrivateAttribute ( LDServerConfigBuilder  b,
char const *  attribute_reference 
)

Specifies a single private attribute. May be called multiple times with additional private attributes.

Parameters
bServer config builder. Must not be NULL.
attribute_referenceAttribute to mark private.

◆ LDServerConfigBuilder_Free()

LDServerConfigBuilder_Free ( LDServerConfigBuilder  builder)

Frees the builder; only necessary if not calling Build.

Parameters
builderBuilder to free.

◆ LDServerConfigBuilder_Hooks()

LDServerConfigBuilder_Hooks ( LDServerConfigBuilder  builder,
struct LDServerSDKHook  hook 
)

Registers a hook with the SDK.

Hooks allow you to instrument SDK behavior for logging, analytics, or distributed tracing (e.g. OpenTelemetry).

Multiple hooks can be registered. They execute in the order registered.

LIFETIME: The hook struct is copied during this call. The Name string must remain valid until LDServerConfigBuilder_Build() is called. UserData and function pointers must remain valid for the SDK lifetime.

Parameters
builderConfiguration builder. Must not be NULL.
hookHook to register. The struct is copied. Must not be NULL.

◆ LDServerConfigBuilder_HttpProperties_Header()

LDServerConfigBuilder_HttpProperties_Header ( LDServerConfigBuilder  b,
char const *  key,
char const *  value 
)

Set a custom header value. May be called more than once with additional headers.

Parameters
bServer config builder. Must not be NULL.
keyName of the header. Must not be NULL.
valueValue of the header. Must not be NULL.

◆ LDServerConfigBuilder_HttpProperties_Proxy()

LDServerConfigBuilder_HttpProperties_Proxy ( LDServerConfigBuilder  b,
char const *  proxy_url 
)

Sets proxy configuration for HTTP requests.

When using CURL networking (LD_CURL_NETWORKING=ON), this controls proxy behavior. The proxy URL takes precedence over environment variables (ALL_PROXY, HTTP_PROXY, HTTPS_PROXY).

Supported proxy types (when CURL networking is enabled):

  • HTTP proxies: "http://proxy:port"
  • HTTPS proxies: "https://proxy:port"
  • SOCKS4 proxies: "socks4://proxy:port"
  • SOCKS5 proxies: "socks5://proxy:port" or "socks5://user:pass@proxy:port"
  • SOCKS5 with DNS through proxy: "socks5h://proxy:port"

Passing an empty string explicitly disables proxy (overrides environment variables).

When CURL networking is disabled, attempting to configure a non-empty proxy will cause the Build function to fail.

Parameters
bServer config builder. Must not be NULL.
proxy_urlProxy URL or empty string to disable. Must not be NULL.

◆ LDServerConfigBuilder_HttpProperties_Tls()

LDServerConfigBuilder_HttpProperties_Tls ( LDServerConfigBuilder  b,
LDServerHttpPropertiesTlsBuilder  tls_builder 
)

Sets the TLS options builder. The builder is automatically freed.

WARNING: Do not call any other LDServerHttpPropertiesTlsBuilder function on the provided LDServerHttpPropertiesTlsBuilder after calling this function. It is undefined behavior.

Parameters
bServer config builder. Must not be NULL.
tls_builderThe TLS options builder. Must not be NULL.

◆ LDServerConfigBuilder_HttpProperties_WrapperName()

LDServerConfigBuilder_HttpProperties_WrapperName ( LDServerConfigBuilder  b,
char const *  wrapper_name 
)

This should be used for wrapper SDKs to set the wrapper name.

Wrapper information will be included in request headers.

Parameters
bServer config builder. Must not be NULL.
wrapper_nameName of the wrapper.

◆ LDServerConfigBuilder_HttpProperties_WrapperVersion()

LDServerConfigBuilder_HttpProperties_WrapperVersion ( LDServerConfigBuilder  b,
char const *  wrapper_version 
)

This should be used for wrapper SDKs to set the wrapper version.

Wrapper information will be included in request headers.

Parameters
bServer config builder. Must not be NULL.
wrapper_versionVersion of the wrapper.

◆ LDServerConfigBuilder_Logging_Basic()

LDServerConfigBuilder_Logging_Basic ( LDServerConfigBuilder  b,
LDLoggingBasicBuilder  basic_builder 
)

Configures the SDK with basic logging. The builder is automatically freed.

WARNING: Do not call any other LDLoggingBasicBuilder function on the provided LDLoggingBasicBuilder after calling this function. It is undefined behavior.

Parameters
bServer config builder. Must not be NULL.
basic_builderThe basic logging builder. Must not be NULL.

◆ LDServerConfigBuilder_Logging_Custom()

LDServerConfigBuilder_Logging_Custom ( LDServerConfigBuilder  b,
LDLoggingCustomBuilder  custom_builder 
)

Configures the SDK with custom logging.

Parameters
bServer config builder. Must not be NULL.
custom_builderThe custom logging builder. Must not be NULL.

◆ LDServerConfigBuilder_Logging_Disable()

LDServerConfigBuilder_Logging_Disable ( LDServerConfigBuilder  b)

Disables the default SDK logging.

Parameters
bServer config builder. Must not be NULL.

◆ LDServerConfigBuilder_New()

LDServerConfigBuilder_New ( char const *  sdk_key)

Constructs a client-side config builder.

◆ LDServerConfigBuilder_Offline()

LDServerConfigBuilder_Offline ( LDServerConfigBuilder  b,
bool  offline 
)

If true, equivalent to setting LDServerConfigBuilder_Events_Enabled(false) and LDServerConfigBuilder_DataSystem_Enabled(false).

The effect is that all evaluations will return application-provided default values, and no network calls will be made.

This overrides specific configuration of events and/or data system, if present.

Parameters
bServer config builder. Must not be NULL.
offlineTrue if offline.

◆ LDServerConfigBuilder_ServiceEndpoints_EventsBaseURL()

LDServerConfigBuilder_ServiceEndpoints_EventsBaseURL ( LDServerConfigBuilder  b,
char const *  url 
)

Sets a custom URL for the events service.

Parameters
bServer config builder. Must not be NULL.
urlTarget URL. Must not be NULL.

◆ LDServerConfigBuilder_ServiceEndpoints_PollingBaseURL()

LDServerConfigBuilder_ServiceEndpoints_PollingBaseURL ( LDServerConfigBuilder  b,
char const *  url 
)

Sets a custom URL for the polling service.

Parameters
bServer config builder. Must not be NULL.
urlTarget URL. Must not be NULL.

◆ LDServerConfigBuilder_ServiceEndpoints_RelayProxyBaseURL()

LDServerConfigBuilder_ServiceEndpoints_RelayProxyBaseURL ( LDServerConfigBuilder  b,
char const *  url 
)

Sets a custom URL for a Relay Proxy instance. The streaming, polling, and events URLs are set automatically.

Parameters
bServer config builder. Must not be NULL.
urlTarget URL. Must not be NULL.

◆ LDServerConfigBuilder_ServiceEndpoints_StreamingBaseURL()

LDServerConfigBuilder_ServiceEndpoints_StreamingBaseURL ( LDServerConfigBuilder  b,
char const *  url 
)

Sets a custom URL for the streaming service.

Parameters
bServer config builder. Must not be NULL.
urlTarget URL. Must not be NULL.

◆ LDServerDataSourcePollBuilder_Filter()

LDServerDataSourcePollBuilder_Filter ( LDServerDataSourcePollBuilder  b,
char const *  filter_key 
)

Sets the filter key for the polling connection.

By default, the SDK is able to evaluate all flags in an environment.

If this is undesirable - for example, because the environment contains thousands of flags, but this application only needs to evaluate a smaller, known subset - then a filter may be setup in LaunchDarkly, and the filter's key specified here.

Evaluations for flags that aren't part of the filtered environment will return default values.

Parameters
bPolling method builder. Must not be NULL.
filter_keyThe filter key. Must not be NULL. If the key is malformed or nonexistent, then a full LaunchDarkly environment will be fetched. In the case of a malformed key, the SDK will additionally log a runtime error.

◆ LDServerDataSourcePollBuilder_Free()

LDServerDataSourcePollBuilder_Free ( LDServerDataSourcePollBuilder  b)

Frees a Polling method builder. Do not call if the builder was consumed by the config builder.

Parameters
bBuilder to free.

◆ LDServerDataSourcePollBuilder_IntervalS()

LDServerDataSourcePollBuilder_IntervalS ( LDServerDataSourcePollBuilder  b,
unsigned int  seconds 
)

Sets the interval at which the SDK will poll for feature flag updates.

Parameters
bPolling method builder. Must not be NULL.
secondsPolling interval in seconds.

◆ LDServerDataSourcePollBuilder_New()

LDServerDataSourcePollBuilder_New ( )

Creates a new DataSource builder for the Polling method.

If not passed into the config builder, must be manually freed with LDServerDataSourcePollBuilder_Free.

Returns
New builder for Polling method.

◆ LDServerDataSourceStreamBuilder_Filter()

LDServerDataSourceStreamBuilder_Filter ( LDServerDataSourceStreamBuilder  b,
char const *  filter_key 
)

Sets the filter key for the streaming connection.

By default, the SDK is able to evaluate all flags in an environment.

If this is undesirable - for example, because the environment contains thousands of flags, but this application only needs to evaluate a smaller, known subset - then a filter may be setup in LaunchDarkly, and the filter's key specified here.

Evaluations for flags that aren't part of the filtered environment will return default values.

Parameters
bStreaming method builder. Must not be NULL.
filter_keyThe filter key. Must not be NULL. If the key is malformed or nonexistent, then a full LaunchDarkly environment will be fetched. In the case of a malformed key, the SDK will additionally log a runtime error.

◆ LDServerDataSourceStreamBuilder_Free()

LDServerDataSourceStreamBuilder_Free ( LDServerDataSourceStreamBuilder  b)

Frees a Streaming method builder. Do not call if the builder was consumed by the config builder.

Parameters
bBuilder to free.

◆ LDServerDataSourceStreamBuilder_InitialReconnectDelayMs()

LDServerDataSourceStreamBuilder_InitialReconnectDelayMs ( LDServerDataSourceStreamBuilder  b,
unsigned int  milliseconds 
)

Sets the initial reconnect delay for the streaming connection.

The streaming service uses a backoff algorithm (with jitter) every time the connection needs to be reestablished.The delay for the first reconnection will start near this value, and then increase exponentially for any subsequent connection failures.

Parameters
bStreaming method builder. Must not be NULL.
millisecondsInitial delay for a reconnection attempt.

◆ LDServerDataSourceStreamBuilder_New()

LDServerDataSourceStreamBuilder_New ( )

Creates a new DataSource builder for the Streaming method.

If not passed into the config builder, must be manually freed with LDServerDataSourceStreamBuilder_Free.

Returns
New builder for Streaming method.

◆ LDServerHttpPropertiesTlsBuilder_CustomCAFile()

LDServerHttpPropertiesTlsBuilder_CustomCAFile ( LDServerHttpPropertiesTlsBuilder  b,
char const *  custom_ca_file 
)

Configures TLS peer certificate verification to use a custom CA file.

The parameter is a filepath pointing to a bundle of one or more PEM-encoded x509 certificates comprising the root of trust for the SDK's outbound connections.

By default, the SDK uses the system's CA bundle. Passing the empty string will unset any previously set path and revert to the system's CA bundle.

Parameters
bServer config builder. Must not be NULL.
custom_ca_fileFilepath of the custom CA bundle, or empty string. Must not be NULL.

◆ LDServerHttpPropertiesTlsBuilder_Free()

LDServerHttpPropertiesTlsBuilder_Free ( LDServerHttpPropertiesTlsBuilder  b)

Frees a TLS options builder. Do not call if the builder was consumed by the HttpProperties builder.

Parameters
bBuilder to free.

◆ LDServerHttpPropertiesTlsBuilder_New()

LDServerHttpPropertiesTlsBuilder_New ( void  )

Creates a new TLS options builder for the HttpProperties builder.

If not passed into the HttpProperties builder, must be manually freed with LDServerHttpPropertiesTlsBuilder_Free.

Returns
New builder for TLS options.

◆ LDServerHttpPropertiesTlsBuilder_SkipVerifyPeer()

LDServerHttpPropertiesTlsBuilder_SkipVerifyPeer ( LDServerHttpPropertiesTlsBuilder  b,
bool  skip_verify_peer 
)

Configures TLS peer certificate verification. Peer verification is enabled by default.

Disabling peer verification is not recommended unless a specific use-case calls for it.

Parameters
bServer config builder. Must not be NULL.
skip_verify_peerTrue to skip verification.