-
Notifications
You must be signed in to change notification settings - Fork 62
Closed
Description
I'm using SauceRest
class that comes with this library to communicate with SauceLabs service.
Recently my build failed (see https://travis-ci.org/aik099/phpunit-mink/jobs/44319424) with following exception:
PHP Fatal error: Uncaught exception 'WebDriver\Exception\CurlExec' with message 'Curl error thrown for http PUT to https://saucelabs.com/rest/v1/aik099/jobs/471ebd9080014f919bea959e2ee1a928 with params: {"passed":true}
server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none' in /home/travis/build/aik099/phpunit-mink/vendor/instaclick/php-webdriver/lib/WebDriver/Exception.php:155
Stack trace:
#0 /home/travis/build/aik099/phpunit-mink/vendor/instaclick/php-webdriver/lib/WebDriver/Service/CurlService.php(97): WebDriver\Exception::factory(-1, 'Curl error thro...')
#1 /home/travis/build/aik099/phpunit-mink/vendor/instaclick/php-webdriver/lib/WebDriver/SauceLabs/SauceRest.php(76): WebDriver\Service\CurlService->execute('PUT', 'https://saucela...', Array, Array)
#2 /home/travis/build/aik099/phpunit-mink/vendor/instaclick/php-webdriver/lib/WebDriver/SauceLabs/SauceRest.php(208): WebDriver\SauceLabs\SauceRest->execute('PUT', 'aik099/jobs/471...', Array)
#3 /home/travis/build/aik099/phpunit-min in /home/travis/build/aik099/phpunit-mink/vendor/instaclick/php-webdriver/lib/WebDriver/Exception.php on line 155
As you can see from the stack trace the SSL certificate on SauceLabs appears to be broken or something like that.
To solve that problem I propose to add extra curl options in https://github.com/instaclick/php-webdriver/blob/master/lib/WebDriver/SauceLabs/SauceRest.php#L76 that would allow to skip SSL certificate validation:
// don't verify SSL certificates
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_SSL_VERIFYHOST => false,
CURLOPT_HTTPHEADER => Array ('Expect:'),
Metadata
Metadata
Assignees
Labels
No labels