class CurlCapabilities

Constants

protected MINIMUM_PINNING_VERSION

protected MINIMUM_TLS_1_2_VERSION

protected MINIMUM_HTTPS_PROXY_VERSION

Properties

static protected bool $pinningSupported

Indicates whether the cURL transport has passed the pinning check.

static protected null|array{version: string, features: int}|false $versionInfo

The libcurl version and feature bits of this process.

Methods

static void
ensurePinningSupported()

Ensure the cURL transport can pin connections to vetted addresses.

static void
ensureHttpsProxySupported(string $host, int $port)

Ensure an HTTPS proxy cannot be silently downgraded to plaintext.

static array|false
versionInfo()

Read the process's libcurl version information once per worker.

static int|null
integerConstant(string $name)

Return an integer cURL constant when the extension exposes it correctly.

static never
fail(string $capability, string|null $version)

Throw an error naming the missing capability.

static void
flushState()

Flush all static state.

Details

at line 32
static void ensurePinningSupported()

Ensure the cURL transport can pin connections to vetted addresses.

Return Value

void

Exceptions

DestinationPolicyException

at line 77
static void ensureHttpsProxySupported(string $host, int $port)

Ensure an HTTPS proxy cannot be silently downgraded to plaintext.

Parameters

string $host
int $port

Return Value

void

Exceptions

DestinationPolicyException

at line 97
static protected array|false versionInfo()

Read the process's libcurl version information once per worker.

Return Value

array|false

at line 125
static protected int|null integerConstant(string $name)

Return an integer cURL constant when the extension exposes it correctly.

Parameters

string $name

Return Value

int|null

at line 141
static protected never fail(string $capability, string|null $version)

Throw an error naming the missing capability.

Parameters

string $capability
string|null $version

Return Value

never

Exceptions

DestinationPolicyException

at line 153
static void flushState()

Flush all static state.

Return Value

void