diff options
| author | xXx-caillou-xXx | 2018-08-29 18:09:51 +0200 |
|---|---|---|
| committer | jvoisin | 2018-08-29 16:09:51 +0000 |
| commit | 89e859d09248de6b1b9b9cdd652cb72c9f7ff098 (patch) | |
| tree | f24c9e82da5bede181607903fb4e98f59210a057 /src/tests/disabled_function_ensure_server_valid_certs.phpt | |
| parent | 10552296658a87e59b60a20214fef1902320d390 (diff) | |
Change how we're validating certificates
Diffstat (limited to '')
| -rw-r--r-- | src/tests/disabled_function_ensure_server_valid_certs.phpt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/tests/disabled_function_ensure_server_valid_certs.phpt b/src/tests/disabled_function_ensure_server_valid_certs.phpt new file mode 100644 index 0000000..01a4406 --- /dev/null +++ b/src/tests/disabled_function_ensure_server_valid_certs.phpt | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | --TEST-- | ||
| 2 | Disable functions - Ensure that server certificates validation can't be disabled | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php | ||
| 5 | if (!extension_loaded("snuffleupagus")) { die("skip"); } | ||
| 6 | if (!extension_loaded("curl")) { die("skip"); } | ||
| 7 | ?> | ||
| 8 | --INI-- | ||
| 9 | sp.configuration_file={PWD}/config/disabled_function_curl_verify_certs.ini | ||
| 10 | --FILE-- | ||
| 11 | <?php | ||
| 12 | $ch = curl_init(); | ||
| 13 | curl_setopt($ch, CURLOPT_VERBOSE, '1'); | ||
| 14 | curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, '0'); | ||
| 15 | echo "1337"; | ||
| 16 | ?> | ||
| 17 | --EXPECTF-- | ||
| 18 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'curl_setopt', because its argument '$option' content (81) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYHOST off.' in %s/tests/disabled_function_ensure_server_valid_certs.php on line %d | ||
