\Composer\CaBundleCaBundle

Summary

Methods
Properties
Constants
getSystemCaRootBundlePath()
getBundledCaBundlePath()
validateCaFile()
isOpensslParseSafe()
reset()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$caPath
$caFileValidity
$useOpensslParse
N/A

Properties

$caPath

$caPath : 

Type

$caFileValidity

$caFileValidity : 

Type

$useOpensslParse

$useOpensslParse : 

Type

Methods

getSystemCaRootBundlePath()

getSystemCaRootBundlePath(\Psr\Log\LoggerInterface  $logger = null) : string

Returns the system CA bundle path, or a path to the bundled one

This method was adapted from Sslurp. https://github.com/EvanDotPro/Sslurp

(c) Evan Coury me@evancoury.com

For the full copyright and license information, please see below:

Copyright (c) 2013, Evan Coury All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice,
  this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
  this list of conditions and the following disclaimer in the documentation
  and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Parameters

\Psr\Log\LoggerInterface $logger

optional logger for information about which CA files were loaded

Returns

string —

path to a CA bundle file or directory

getBundledCaBundlePath()

getBundledCaBundlePath() : string

Returns the path to the bundled CA file

In case you don't want to trust the user or the system, you can use this directly

Returns

string —

path to a CA bundle file

validateCaFile()

validateCaFile(string  $filename, \Psr\Log\LoggerInterface  $logger = null) : boolean

Validates a CA file using opensl_x509_parse only if it is safe to use

Parameters

string $filename
\Psr\Log\LoggerInterface $logger

optional logger for information about which CA files were loaded

Returns

boolean

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

reset()

reset() 

Resets the static caches