summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--appveyor/build_task.bat12
-rw-r--r--ext/openssl/tests/openssl_error_string_basic.phpt13
2 files changed, 24 insertions, 1 deletions
diff --git a/appveyor/build_task.bat b/appveyor/build_task.bat
index 869340401d..ede3fd2eb4 100644
--- a/appveyor/build_task.bat
+++ b/appveyor/build_task.bat
@@ -10,6 +10,18 @@ if "%APPVEYOR%" equ "True" rmdir /s /q C:\mingw-w64 >NUL 2>NUL
if %errorlevel% neq 0 exit /b 3
if "%APPVEYOR%" equ "True" rmdir /s /q C:\msys64 >NUL 2>NUL
if %errorlevel% neq 0 exit /b 3
+if "%APPVEYOR%" equ "True" rmdir /s /q c:\OpenSSL-Win32 >NUL 2>NUL
+if %errorlevel% neq 0 exit /b 3
+if "%APPVEYOR%" equ "True" rmdir /s /q c:\OpenSSL-Win64 >NUL 2>NUL
+if %errorlevel% neq 0 exit /b 3
+if "%APPVEYOR%" equ "True" rmdir /s /q c:\OpenSSL-v11-Win32 >NUL 2>NUL
+if %errorlevel% neq 0 exit /b 3
+if "%APPVEYOR%" equ "True" rmdir /s /q c:\OpenSSL-v11-Win64 >NUL 2>NUL
+if %errorlevel% neq 0 exit /b 3
+if "%APPVEYOR%" equ "True" del /f /q C:\Windows\System32\libcrypto-1_1-x64.dll >NUL 2>NUL
+if %errorlevel% neq 0 exit /b 3
+if "%APPVEYOR%" equ "True" del /f /q C:\Windows\System32\libssl-1_1-x64.dll >NUL 2>NUL
+if %errorlevel% neq 0 exit /b 3
cd /D %APPVEYOR_BUILD_FOLDER%
if %errorlevel% neq 0 exit /b 3
diff --git a/ext/openssl/tests/openssl_error_string_basic.phpt b/ext/openssl/tests/openssl_error_string_basic.phpt
index af8f81f842..b52658aca4 100644
--- a/ext/openssl/tests/openssl_error_string_basic.phpt
+++ b/ext/openssl/tests/openssl_error_string_basic.phpt
@@ -7,13 +7,17 @@ openssl_error_string() tests
// helper function to check openssl errors
function expect_openssl_errors($name, $expected_error_codes) {
$expected_errors = array_fill_keys($expected_error_codes, false);
+ $all_errors = array();
while (($error_string = openssl_error_string()) !== false) {
if (preg_match(",.+:([0-9A-F]+):.+,", $error_string, $m) > 0) {
$error_code = $m[1];
if (isset($expected_errors[$error_code])) {
$expected_errors[$error_code] = true;
}
- }
+ $all_errors[$error_code] = $error_string;
+ } else {
+ $all_errors[] = $error_string;
+ }
}
$fail = false;
@@ -26,6 +30,13 @@ function expect_openssl_errors($name, $expected_error_codes) {
if (!$fail) {
echo "$name: ok\n";
+ } else {
+ echo "$name: uncaught errors\n";
+ foreach ($all_errors as $code => $str) {
+ if (!isset($expected_errors[$code]) || !$expected_errors[$code]) {
+ echo "\t", $code, ": ", $str, "\n";
+ }
+ }
}
}