Skip to content

Commit 5a5037f

Browse files
committed
Merge branch 'PHP-8.2'
* PHP-8.2: Fix GH-9890: OpenSSL legacy providers not available on Windows
2 parents 0ff9df9 + 9aa86e6 commit 5a5037f

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

win32/build/mkdist.php

Lines changed: 16 additions & 0 deletions
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)