PluginProbe ʕ •ᴥ•ʔ
Matomo Analytics – Powerful, Privacy-First Insights for WordPress / 5.2.0
Matomo Analytics – Powerful, Privacy-First Insights for WordPress v5.2.0
5.11.1 5.11.0 5.10.2 5.10.1 trunk 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.3.0 1.3.1 1.3.2 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.1.0 4.1.1 4.1.2 4.1.3 4.10.0 4.11.0 4.12.0 4.13.0 4.13.2 4.13.3 4.13.4 4.13.5 4.14.0 4.14.1 4.14.2 4.15.0 4.15.1 4.15.2 4.15.3 4.2.0 4.3.0 4.3.1 4.4.1 4.4.2 4.5.0 4.6.0 5.0.1 5.0.2 5.0.3 5.0.4 5.0.5 5.0.6 5.0.7 5.0.8 5.1.0 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 5.1.7 5.10.0 5.2.0 5.2.1 5.2.2 5.3.0 5.3.1 5.3.2 5.3.3 5.6.0 5.6.1 5.7.0 5.7.1 5.8.0 5.8.1 5.8.2
matomo / app / vendor / composer / ca-bundle / README.md
matomo / app / vendor / composer / ca-bundle Last commit date
res 1 year ago src 1 year ago LICENSE 6 years ago README.md 6 years ago
README.md
86 lines
1 composer/ca-bundle
2 ==================
3
4 Small utility library that lets you find a path to the system CA bundle,
5 and includes a fallback to the Mozilla CA bundle.
6
7 Originally written as part of [](https://github.com/composer/composercomposer/composer](https://github.com/composer/composer](https://github.com/composer/composer),
8 now extracted and made available as a stand-alone library.
9
10
11 Installation
12 ------------
13
14 Install the latest version with:
15
16 ```bash
17 $ composer require composer/ca-bundle
18 ```
19
20
21 Requirements
22 ------------
23
24 * PHP 5.3.2 is required but using the latest version of PHP is highly recommended.
25
26
27 Basic usage
28 -----------
29
30 ### `Composer\CaBundle\CaBundle`
31
32 - `CaBundle::getSystemCaRootBundlePath()`: Returns the system CA bundle path, or a path to the bundled one as fallback
33 - `CaBundle::getBundledCaBundlePath()`: Returns the path to the bundled CA file
34 - `CaBundle::validateCaFile($filename)`: Validates a CA file using openssl_x509_parse only if it is safe to use
35 - `CaBundle::isOpensslParseSafe()`: Test if it is safe to use the PHP function openssl_x509_parse()
36 - `CaBundle::reset()`: Resets the static caches
37
38
39 #### To use with curl
40
41 ```php
42 $curl = curl_init("https://example.org/");
43
44 $caPathOrFile = \Composer\CaBundle\CaBundle::getSystemCaRootBundlePath();
45 if (is_dir($caPathOrFile)) {
46 curl_setopt($curl, CURLOPT_CAPATH, $caPathOrFile);
47 } else {
48 curl_setopt($curl, CURLOPT_CAINFO, $caPathOrFile);
49 }
50
51 $result = curl_exec($curl);
52 ```
53
54 #### To use with php streams
55
56 ```php
57 $opts = array(
58 'http' => array(
59 'method' => "GET"
60 )
61 );
62
63 $caPathOrFile = \Composer\CaBundle\CaBundle::getSystemCaRootBundlePath();
64 if (is_dir($caPathOrFile)) {
65 $opts['ssl']['capath'] = $caPathOrFile;
66 } else {
67 $opts['ssl']['cafile'] = $caPathOrFile;
68 }
69
70 $context = stream_context_create($opts);
71 $result = file_get_contents('https://example.com', false, $context);
72 ```
73
74 #### To use with Guzzle
75
76 ```php
77 $client = new \GuzzleHttp\Client([
78 \GuzzleHttp\RequestOptions::VERIFY => \Composer\CaBundle\CaBundle::getSystemCaRootBundlePath()
79 ]);
80 ```
81
82 License
83 -------
84
85 composer/ca-bundle is licensed under the MIT License, see the LICENSE file for details.
86