Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 9, 2024 via composer

composer/ca-bundle 1.4.0

Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.
Package summary
Share
0
issues
1
license
1
MIT
Package created
11 Apr 2016
Version published
18 Dec 2023
Maintainers
1
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
composer/ca-bundle@1.4.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of composer/ca-bundle 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does composer/ca-bundle do?

The composer/ca-bundle is a versatile utility library utilized to detect a path to the system Certificate Authority (CA) bundle, thus ensuring efficient communication between servers. As a fallback provision, it features an inclusion to the Mozilla CA bundle. It was initially integrated as part of composer/composer, and as its significance became more prominent, it's now made available as a standalone library.

How do you use composer/ca-bundle?

Usage of the composer/ca-bundle demands a PHP version of 5.3.2 or above, although the latest version is recommended for best performance. Installation of the composer/ca-bundle can be achieved effortlessly with the following command: $ composer require composer/ca-bundle

Once installed, the library provides a set of functions for different usages. Below are some examples demonstrating how to use these functions:

  1. With curl :
$curl = curl_init("https://example.org/");
$caPathOrFile = \Composer\CaBundle\CaBundle::getSystemCaRootBundlePath();
if (is_dir($caPathOrFile)) {
    curl_setopt($curl, CURLOPT_CAPATH, $caPathOrFile);
} else {
    curl_setopt($curl, CURLOPT_CAINFO, $caPathOrFile);
}
$result = curl_exec($curl);
  1. With php streams :
$opts = array(
    'http' => array(
        'method' => "GET"
    )
);
$caPathOrFile = \Composer\CaBundle\CaBundle::getSystemCaRootBundlePath();
if (is_dir($caPathOrFile)) {
    $opts['ssl']['capath'] = $caPathOrFile;
} else {
    $opts['ssl']['cafile'] = $caPathOrFile;
}
$context = stream_context_create($opts);
$result = file_get_contents('https://example.com', false, $context);
  1. With Guzzle :
$client = new \GuzzleHttp\Client([
    \GuzzleHttp\RequestOptions::VERIFY => \Composer\CaBundle\CaBundle::getSystemCaRootBundlePath()
]);

Where are the composer/ca-bundle docs?

The complete documentation for composer/ca-bundle can be found on its official GitHub page. This resource provides an in-depth look into the usage, installation, requirements, and various examples of how to implement this package. The code is open-source and licensed under the MIT License.