|
@@ -14,34 +14,5 @@ echoLine("tsDay:" . totalDays());
|
|
|
//set_time_limit(15); # 设置执行超时时间
|
|
|
//
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-$url = 'https://fancyssl.hboeck.de/';
|
|
|
-
|
|
|
-$protocols = [
|
|
|
- 'TLS1.0' => ['protocol' => CURL_SSLVERSION_TLSv1_0, 'sec' => false],
|
|
|
- 'TLS1.1' => ['protocol' => CURL_SSLVERSION_TLSv1_1, 'sec' => false],
|
|
|
- 'TLS1.2' => ['protocol' => CURL_SSLVERSION_TLSv1_2, 'sec' => true],
|
|
|
- 'TLS1.3' => ['protocol' => CURL_SSLVERSION_TLSv1_3, 'sec' => true],
|
|
|
-];
|
|
|
-
|
|
|
-foreach ($protocols as $name => $value) {
|
|
|
- $ch = curl_init();
|
|
|
- curl_setopt($ch, CURLOPT_URL, $url);
|
|
|
- curl_setopt($ch, CURLOPT_SSLVERSION, $value['protocol']);
|
|
|
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
|
|
- $response = curl_exec($ch) !== false;
|
|
|
-
|
|
|
- if ($value['sec'] && !$response) {
|
|
|
- echo "Secure $name not supported =( \n";
|
|
|
- } elseif ($value['sec'] && $response) {
|
|
|
- echo "Ok! Secure $name supported \n";
|
|
|
- } elseif (!$value['sec'] && $response) {
|
|
|
- echo "OK! Insecure $name supported =( \n";
|
|
|
- } elseif (!$value['sec'] && !$response) {
|
|
|
- echo "Insecure $name not supported\n";
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
|