mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4: Update NEWS entry for curl 8.16 update Update NEWS with info about curl 8.16 compat fixes Fix curl_setopt_ssl test for curl 8.16 Fix more curl 8.16 issues Fix curl 8.16.0 compilation with zts Fix curl build failure on macOS+curl 8.16
This commit is contained in:
@@ -18,9 +18,13 @@ if ($curl_version['version_number'] < 0x074700) {
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function check_error(CurlHandle $ch) {
|
||||
function check_error(CurlHandle $ch, $expected = null) {
|
||||
if (curl_errno($ch) !== 0) {
|
||||
echo "CURL ERROR: " . curl_errno($ch) . "\n";
|
||||
$errno = curl_errno($ch);
|
||||
if (!is_null($expected)) {
|
||||
$errno = $errno == $expected ? 'EXPECTED' : "UNEXPECTED(A:$errno,E:$expected)";
|
||||
}
|
||||
echo "CURL ERROR: " . $errno . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,7 +113,7 @@ try {
|
||||
|
||||
$response = curl_exec($ch);
|
||||
check_response($response, $clientCertSubject);
|
||||
check_error($ch);
|
||||
check_error($ch, curl_version()['version_number'] < 0x081000 ? 58 : 43);
|
||||
$ch = null;
|
||||
|
||||
echo "\n";
|
||||
@@ -203,7 +207,7 @@ bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
client cert subject not in response
|
||||
CURL ERROR: 58
|
||||
CURL ERROR: EXPECTED
|
||||
|
||||
case 4: client cert and key from file
|
||||
bool(true)
|
||||
|
||||
Reference in New Issue
Block a user