Codex.Net.CA (Codex SDK v0.14.0)

Copy Markdown View Source

Shared custom CA bundle resolution for subprocesses and outbound TLS clients.

CODEX_CA_CERTIFICATE takes precedence over SSL_CERT_FILE. Blank values are treated as unset. When neither variable is set, callers should fall back to system trust roots.

Summary

Functions

Returns the effective CA certificate bundle path, if any.

Returns subprocess environment overrides for the resolved CA bundle.

Returns subprocess environment overrides for the resolved CA bundle.

Returns :httpc SSL options for the resolved CA bundle.

Merges CA-specific SSL options into an :httpc options keyword list.

Merges CA-specific connect_options into an existing Req options keyword list.

Returns Req connect_options for the resolved CA bundle.

Returns websocket SSL options for the resolved CA bundle.

Functions

certificate_file()

@spec certificate_file() :: String.t() | nil

Returns the effective CA certificate bundle path, if any.

certificate_file(env)

@spec certificate_file(map()) :: String.t() | nil

env_overrides()

@spec env_overrides() :: %{optional(String.t()) => String.t()}

Returns subprocess environment overrides for the resolved CA bundle.

env_overrides(env)

@spec env_overrides(map()) :: %{optional(String.t()) => String.t()}

Returns subprocess environment overrides for the resolved CA bundle.

httpc_ssl_options()

@spec httpc_ssl_options() :: keyword()

Returns :httpc SSL options for the resolved CA bundle.

httpc_ssl_options(env)

@spec httpc_ssl_options(map()) :: keyword()

merge_httpc_options(opts \\ [])

@spec merge_httpc_options(keyword()) :: keyword()

merge_httpc_options(opts, env)

@spec merge_httpc_options(
  keyword(),
  map()
) :: keyword()

Merges CA-specific SSL options into an :httpc options keyword list.

merge_req_options(opts \\ [])

@spec merge_req_options(keyword()) :: keyword()

merge_req_options(opts, env)

@spec merge_req_options(
  keyword(),
  map()
) :: keyword()

Merges CA-specific connect_options into an existing Req options keyword list.

req_connect_options()

@spec req_connect_options() :: keyword()

Returns Req connect_options for the resolved CA bundle.

req_connect_options(env)

@spec req_connect_options(map()) :: keyword()

websocket_ssl_options()

@spec websocket_ssl_options() :: keyword()

Returns websocket SSL options for the resolved CA bundle.

websocket_ssl_options(env)

@spec websocket_ssl_options(map()) :: keyword()