Skip to content

Commit 9aa86e6

Browse files
committed
Fix GH-9890: OpenSSL legacy providers not available on Windows
We need to copy the provider DLLs from the dependency package to the PHP distribution. Closes GH-9894.
1 parent d3933e0 commit 9aa86e6

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

NEWS

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ PHP NEWS
77
(cmb)
88
. Fixed bug GH-9918 (License information for xxHash is not included in
99
README.REDIST.BINS file). (Akama Hitoshi)
10+
. Fixed bug GH-9890 (OpenSSL legacy providers not available on Windows). (cmb)
1011

11-
Pcntl:
12+
- Pcntl:
1213
. Fixed bug GH-9298 (Signal handler called after rshutdown leads to crash).
1314
(Erki Aring)
1415

win32/build/mkdist.php

+16
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,22 @@ function extract_file_from_tarball($pkg, $filename, $dest_dir) /* {{{ */
357357
}
358358
}
359359

360+
$OPENSSL_DLLS = $php_build_dir . "/lib/ossl-modules/*.dll";
361+
$fls = glob($OPENSSL_DLLS);
362+
if (!empty($fls)) {
363+
$openssl_dest_dir = "$dist_dir/extras/ssl";
364+
if (!file_exists($openssl_dest_dir) || !is_dir($openssl_dest_dir)) {
365+
if (!mkdir($openssl_dest_dir, 0777, true)) {
366+
echo "WARNING: couldn't create '$openssl_dest_dir' for OpenSSL providers ";
367+
}
368+
}
369+
foreach ($fls as $fl) {
370+
if (!copy($fl, "$openssl_dest_dir/" . basename($fl))) {
371+
echo "WARNING: couldn't copy $fl into the $openssl_dest_dir";
372+
}
373+
}
374+
}
375+
360376
$SASL_DLLS = $php_build_dir . "/bin/sasl2/sasl*.dll";
361377
$fls = glob($SASL_DLLS);
362378
if (!empty($fls)) {

0 commit comments

Comments
 (0)