Skip to content

Commit

Permalink
Fix GH-9890: OpenSSL legacy providers not available on Windows
Browse files Browse the repository at this point in the history
We need to copy the provider DLLs from the dependency package to the
PHP distribution.

Closes GH-9894.
  • Loading branch information
cmb69 committed Nov 14, 2022
1 parent d3933e0 commit 9aa86e6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
3 changes: 2 additions & 1 deletion NEWS
Expand Up @@ -7,8 +7,9 @@ PHP NEWS
(cmb)
. Fixed bug GH-9918 (License information for xxHash is not included in
README.REDIST.BINS file). (Akama Hitoshi)
. Fixed bug GH-9890 (OpenSSL legacy providers not available on Windows). (cmb)

Pcntl:
- Pcntl:
. Fixed bug GH-9298 (Signal handler called after rshutdown leads to crash).
(Erki Aring)

Expand Down
16 changes: 16 additions & 0 deletions win32/build/mkdist.php
Expand Up @@ -357,6 +357,22 @@ function extract_file_from_tarball($pkg, $filename, $dest_dir) /* {{{ */
}
}

$OPENSSL_DLLS = $php_build_dir . "/lib/ossl-modules/*.dll";
$fls = glob($OPENSSL_DLLS);
if (!empty($fls)) {
$openssl_dest_dir = "$dist_dir/extras/ssl";
if (!file_exists($openssl_dest_dir) || !is_dir($openssl_dest_dir)) {
if (!mkdir($openssl_dest_dir, 0777, true)) {
echo "WARNING: couldn't create '$openssl_dest_dir' for OpenSSL providers ";
}
}
foreach ($fls as $fl) {
if (!copy($fl, "$openssl_dest_dir/" . basename($fl))) {
echo "WARNING: couldn't copy $fl into the $openssl_dest_dir";
}
}
}

$SASL_DLLS = $php_build_dir . "/bin/sasl2/sasl*.dll";
$fls = glob($SASL_DLLS);
if (!empty($fls)) {
Expand Down

0 comments on commit 9aa86e6

Please sign in to comment.