Composer API
Class

Composer\Util\TlsHelper

class TlsHelper

Methods

static bool checkCertificateHost(mixed $certificate, string $hostname, string $cn = null)

Match hostname against a certificate.

static array|null getCertificateNames(mixed $certificate)

Extract DNS names out of an X.509 certificate.

static  getCertificateFingerprint($certificate)

Get the certificate pin.

static bool isOpensslParseSafe()

Test if it is safe to use the PHP function opensslx509parse().

Details

at line 33
static public bool checkCertificateHost(mixed $certificate, string $hostname, string $cn = null)

Match hostname against a certificate.

Parameters

mixed $certificate X.509 certificate
string $hostname Hostname in the URL
string $cn Set to the common name of the certificate iff match found

Return Value

bool

at line 64
static public array|null getCertificateNames(mixed $certificate)

Extract DNS names out of an X.509 certificate.

Parameters

mixed $certificate X.509 certificate

Return Value

array|null

at line 136
static public getCertificateFingerprint($certificate)

Get the certificate pin.

By Kevin McArthur of StormTide Digital Studios Inc.

Parameters

$certificate

at line 157
static public bool isOpensslParseSafe()

Test if it is safe to use the PHP function opensslx509parse().

This checks if OpenSSL extensions is vulnerable to remote code execution via the exploit documented as CVE-2013-6420.

Return Value

bool