"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "public_html/lists/base/vendor/composer/ca-bundle/src/CaBundle.php" between
phplist-3.4.9.tgz and phplist-3.5.0.tgz

About: phpList is a one-way email announcement delivery system for newsletters, publicity lists, notifications, and many other uses (requires PHP and MySQL).

CaBundle.php  (phplist-3.4.9.tgz):CaBundle.php  (phplist-3.5.0.tgz)
skipping to change at line 73 skipping to change at line 73
*/ */
public static function getSystemCaRootBundlePath(LoggerInterface $logger = n ull) public static function getSystemCaRootBundlePath(LoggerInterface $logger = n ull)
{ {
if (self::$caPath !== null) { if (self::$caPath !== null) {
return self::$caPath; return self::$caPath;
} }
$caBundlePaths = array(); $caBundlePaths = array();
// If SSL_CERT_FILE env variable points to a valid certificate/bundle, u se that. // If SSL_CERT_FILE env variable points to a valid certificate/bundle, u se that.
// This mimics how OpenSSL uses the SSL_CERT_FILE env variable. // This mimics how OpenSSL uses the SSL_CERT_FILE env variable.
$caBundlePaths[] = getenv('SSL_CERT_FILE'); $caBundlePaths[] = self::getEnvVariable('SSL_CERT_FILE');
// If SSL_CERT_DIR env variable points to a valid certificate/bundle, us e that. // If SSL_CERT_DIR env variable points to a valid certificate/bundle, us e that.
// This mimics how OpenSSL uses the SSL_CERT_FILE env variable. // This mimics how OpenSSL uses the SSL_CERT_FILE env variable.
$caBundlePaths[] = getenv('SSL_CERT_DIR'); $caBundlePaths[] = self::getEnvVariable('SSL_CERT_DIR');
$caBundlePaths[] = ini_get('openssl.cafile'); $caBundlePaths[] = ini_get('openssl.cafile');
$caBundlePaths[] = ini_get('openssl.capath'); $caBundlePaths[] = ini_get('openssl.capath');
$otherLocations = array( $otherLocations = array(
'/etc/pki/tls/certs/ca-bundle.crt', // Fedora, RHEL, CentOS (ca-cert ificates package) '/etc/pki/tls/certs/ca-bundle.crt', // Fedora, RHEL, CentOS (ca-cert ificates package)
'/etc/ssl/certs/ca-certificates.crt', // Debian, Ubuntu, Gentoo, Arc h Linux (ca-certificates package) '/etc/ssl/certs/ca-certificates.crt', // Debian, Ubuntu, Gentoo, Arc h Linux (ca-certificates package)
'/etc/ssl/ca-bundle.pem', // SUSE, openSUSE (ca-certificates package ) '/etc/ssl/ca-bundle.pem', // SUSE, openSUSE (ca-certificates package )
'/usr/local/share/certs/ca-root-nss.crt', // FreeBSD (ca_root_nss_pa ckage) '/usr/local/share/certs/ca-root-nss.crt', // FreeBSD (ca_root_nss_pa ckage)
'/usr/ssl/certs/ca-bundle.crt', // Cygwin '/usr/ssl/certs/ca-bundle.crt', // Cygwin
skipping to change at line 301 skipping to change at line 301
/** /**
* Resets the static caches * Resets the static caches
*/ */
public static function reset() public static function reset()
{ {
self::$caFileValidity = array(); self::$caFileValidity = array();
self::$caPath = null; self::$caPath = null;
self::$useOpensslParse = null; self::$useOpensslParse = null;
} }
private static function getEnvVariable($name)
{
if (isset($_SERVER[$name])) {
return (string) $_SERVER[$name];
}
if (PHP_SAPI === 'cli' && ($value = getenv($name)) !== false && $value !
== null) {
return (string) $value;
}
return false;
}
private static function caFileUsable($certFile, LoggerInterface $logger = nu ll) private static function caFileUsable($certFile, LoggerInterface $logger = nu ll)
{ {
return $certFile && @is_file($certFile) && @is_readable($certFile) && st atic::validateCaFile($certFile, $logger); return $certFile && @is_file($certFile) && @is_readable($certFile) && st atic::validateCaFile($certFile, $logger);
} }
private static function caDirUsable($certDir) private static function caDirUsable($certDir)
{ {
return $certDir && @is_dir($certDir) && @is_readable($certDir) && glob($ certDir . '/*'); return $certDir && @is_dir($certDir) && @is_readable($certDir) && glob($ certDir . '/*');
} }
} }
 End of changes. 3 change blocks. 
2 lines changed or deleted 16 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)