| @@ 421-433 (lines=13) @@ | ||
| 418 | } |
|
| 419 | } |
|
| 420 | ||
| 421 | if (isset($options['cert'])) { |
|
| 422 | $cert = $options['cert']; |
|
| 423 | if (is_array($cert)) { |
|
| 424 | $conf[CURLOPT_SSLCERTPASSWD] = $cert[1]; |
|
| 425 | $cert = $cert[0]; |
|
| 426 | } |
|
| 427 | if (!file_exists($cert)) { |
|
| 428 | throw new \InvalidArgumentException( |
|
| 429 | "SSL certificate not found: {$cert}" |
|
| 430 | ); |
|
| 431 | } |
|
| 432 | $conf[CURLOPT_SSLCERT] = $cert; |
|
| 433 | } |
|
| 434 | ||
| 435 | if (isset($options['ssl_key'])) { |
|
| 436 | $sslKey = $options['ssl_key']; |
|
| @@ 435-447 (lines=13) @@ | ||
| 432 | $conf[CURLOPT_SSLCERT] = $cert; |
|
| 433 | } |
|
| 434 | ||
| 435 | if (isset($options['ssl_key'])) { |
|
| 436 | $sslKey = $options['ssl_key']; |
|
| 437 | if (is_array($sslKey)) { |
|
| 438 | $conf[CURLOPT_SSLKEYPASSWD] = $sslKey[1]; |
|
| 439 | $sslKey = $sslKey[0]; |
|
| 440 | } |
|
| 441 | if (!file_exists($sslKey)) { |
|
| 442 | throw new \InvalidArgumentException( |
|
| 443 | "SSL private key not found: {$sslKey}" |
|
| 444 | ); |
|
| 445 | } |
|
| 446 | $conf[CURLOPT_SSLKEY] = $sslKey; |
|
| 447 | } |
|
| 448 | ||
| 449 | if (isset($options['progress'])) { |
|
| 450 | $progress = $options['progress']; |
|