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