function StreamHandler::add_cert
Parameters
mixed $value as passed via Request transfer options.:
File
-
vendor/
guzzlehttp/ guzzle/ src/ Handler/ StreamHandler.php, line 532
Class
- StreamHandler
- HTTP handler that uses PHP's HTTP stream wrapper.
Namespace
GuzzleHttp\HandlerCode
private function add_cert(RequestInterface $request, array &$options, $value, array &$params) : void {
if (\is_array($value)) {
$options['ssl']['passphrase'] = $value[1];
$value = $value[0];
}
if (!\file_exists($value)) {
throw new \RuntimeException("SSL certificate not found: {$value}");
}
$options['ssl']['local_cert'] = $value;
}