\Composer\UtilTlsHelper

Summary

Methods
Properties
Constants
checkCertificateHost()
getCertificateNames()
getCertificateFingerprint()
isOpensslParseSafe()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
certNameMatcher()
$useOpensslParse
N/A

Properties

$useOpensslParse

$useOpensslParse : 

Type

Methods

checkCertificateHost()

checkCertificateHost(mixed  $certificate, string  $hostname, string  $cn = null) : boolean

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

Returns

boolean

getCertificateNames()

getCertificateNames(mixed  $certificate) : array|null

Extract DNS names out of an X.509 certificate.

Parameters

mixed $certificate

X.509 certificate

Returns

array|null

getCertificateFingerprint()

getCertificateFingerprint(  $certificate) 

Get the certificate pin.

By Kevin McArthur of StormTide Digital Studios Inc.

Parameters

$certificate

isOpensslParseSafe()

isOpensslParseSafe() : boolean

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

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

Returns

boolean

certNameMatcher()

certNameMatcher(string  $certName) : callable|null

Convert certificate name into matching function.

Parameters

string $certName

CN/SAN

Returns

callable|null