script:
# to have code coverage: --coverage-clover=coverage.clover
- phpunit tests LOCALSERVER=localhost URI=/demo/server/server.php HTTPSSERVER=localhost HTTPSURI=/demo/server/server.php PROXY=localhost:8080 HTTPSIGNOREPEER=1
+ phpunit tests LOCALSERVER=localhost URI=/demo/server/server.php HTTPSSERVER=localhost HTTPSURI=/demo/server/server.php PROXY=localhost:8080 HTTPSVERIFYHOST=0
after_failure:
- cat apache_error.log
- cat apache_access.log
- - cat /etc/ssl/certs/ssl-cert-snakeoil.pem
after_script:
# # upload code-coverage to Scrutinizer
// (but only if not called from subclass objects / multitests)
if (function_exists('debug_backtrace') && strtolower(get_called_class()) == 'localhosttests') {
global $failed_tests;
- $trace = debug_backtrace();
+ $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
for ($i = 0; $i < count($trace); $i++) {
if (strpos($trace[$i]['function'], 'test') === 0) {
self::$failed_tests[$trace[$i]['function']] = true;
$this->client->method = 'https';
$this->client->path = $this->args['HTTPSURI'];
$this->client->setSSLVerifyPeer( !$this->args['HTTPSIGNOREPEER'] );
+ $this->client->setSSLVerifyHost($this->args['HTTPSVERIFYHOST'] );
$this->_runtests();
}
$this->client->setProxy($this->args['PROXYSERVER'], $this->args['PROXYPORT']);
$this->client->path = $this->args['HTTPSURI'];
$this->client->setSSLVerifyPeer( !$this->args['HTTPSIGNOREPEER'] );
+ $this->client->setSSLVerifyHost($this->args['HTTPSVERIFYHOST'] );
$this->_runtests();
}
</IfModule>
SSLEngine on
+ # This cert is bundled by default in Ubuntu
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
</VirtualHost>
-</IfModule>
\ No newline at end of file
+</IfModule>
</IfModule>
SSLEngine on
+ # This cert is bundled by default in Ubuntu
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
</VirtualHost>
-</IfModule>
\ No newline at end of file
+</IfModule>
* @param string HTTPSSURI
* @param string PROXY
* @param string NOPROXY
+ * @param bool HTTPSIGNOREPEER
+ * @param int HTTPSVERIFYHOST
*
- * @copyright (C) 2007-20014 G. Giunta
+ * @copyright (C) 2007-2015 G. Giunta
* @license code licensed under the BSD License: see file license.txt
**/
class argParser
'HTTPSSERVER' => 'gggeek.ssl.altervista.org',
'HTTPSURI' => '/sw/xmlrpc/demo/server/server.php',
'HTTPSIGNOREPEER' => false,
+ 'HTTPSVERIFYHOST' => 2,
'PROXYSERVER' => null,
'NOPROXY' => false,
'LOCALPATH' => __DIR__,
if (isset($HTTPSIGNOREPEER)) {
$args['HTTPSIGNOREPEER'] = (bool)$HTTPSIGNOREPEER;
}
+ if (isset($HTTPSVERIFYHOST)) {
+ $args['HTTPSVERIFYHOST'] = (int)$HTTPSVERIFYHOST;
+ }
if (isset($PROXY)) {
$arr = explode(':', $PROXY);
$args['PROXYSERVER'] = $arr[0];