[ Index ]

PHP Cross Reference of YOURLS

title

Body

[close]

/includes/vendor/composer/ca-bundle/src/ -> CaBundle.php (summary)

(no description)

File Size: 431 lines (18 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

CaBundle:: (12 methods):
  getSystemCaRootBundlePath()
  getBundledCaBundlePath()
  validateCaFile()
  isOpensslParseSafe()
  reset()
  getEnvVariable()
  caFileUsable()
  caDirUsable()
  isFile()
  isDir()
  isReadable()
  glob()


Class: CaBundle  - X-Ref


getSystemCaRootBundlePath(LoggerInterface $logger = null)   X-Ref
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 <[email protected]>

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.

return: string          path to a CA bundle file or directory
param: LoggerInterface $logger optional logger for information about which CA files were loaded

getBundledCaBundlePath()   X-Ref
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

return: string path to a CA bundle file

validateCaFile($filename, LoggerInterface $logger = null)   X-Ref
Validates a CA file using opensl_x509_parse only if it is safe to use

return: bool
param: string          $filename
param: LoggerInterface $logger   optional logger for information about which CA files were loaded

isOpensslParseSafe()   X-Ref
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.

return: bool

reset()   X-Ref
Resets the static caches

return: void

getEnvVariable($name)   X-Ref

return: string|false
param: string $name

caFileUsable($certFile, LoggerInterface $logger = null)   X-Ref

return: bool
param: string|false $certFile
param: LoggerInterface|null $logger

caDirUsable($certDir, LoggerInterface $logger = null)   X-Ref

return: bool
param: string|false $certDir
param: LoggerInterface|null $logger

isFile($certFile, LoggerInterface $logger = null)   X-Ref

return: bool
param: string $certFile
param: LoggerInterface|null $logger

isDir($certDir, LoggerInterface $logger = null)   X-Ref

return: bool
param: string $certDir
param: LoggerInterface|null $logger

isReadable($certFileOrDir, LoggerInterface $logger = null)   X-Ref

return: bool
param: string $certFileOrDir
param: LoggerInterface|null $logger

glob($pattern, LoggerInterface $logger = null)   X-Ref

return: bool
param: string $pattern
param: LoggerInterface|null $logger



Generated: Tue Jan 21 05:10:11 2025 Cross-referenced by PHPXref 0.7.1