summaryrefslogtreecommitdiff
path: root/src/tests/disabled_function_ensure_server_valid_certs.phpt
diff options
context:
space:
mode:
authorxXx-caillou-xXx2018-08-29 18:09:51 +0200
committerjvoisin2018-08-29 16:09:51 +0000
commit89e859d09248de6b1b9b9cdd652cb72c9f7ff098 (patch)
treef24c9e82da5bede181607903fb4e98f59210a057 /src/tests/disabled_function_ensure_server_valid_certs.phpt
parent10552296658a87e59b60a20214fef1902320d390 (diff)
Change how we're validating certificates
Diffstat (limited to '')
-rw-r--r--src/tests/disabled_function_ensure_server_valid_certs.phpt18
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--
2Disable functions - Ensure that server certificates validation can't be disabled
3--SKIPIF--
4<?php
5if (!extension_loaded("snuffleupagus")) { die("skip"); }
6if (!extension_loaded("curl")) { die("skip"); }
7?>
8--INI--
9sp.configuration_file={PWD}/config/disabled_function_curl_verify_certs.ini
10--FILE--
11<?php
12$ch = curl_init();
13curl_setopt($ch, CURLOPT_VERBOSE, '1');
14curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, '0');
15echo "1337";
16?>
17--EXPECTF--
18Fatal 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