diff --git a/win32/build/mkdist.php b/win32/build/mkdist.php index 8ae3926b652b1..58453b062ddd0 100644 --- a/win32/build/mkdist.php +++ b/win32/build/mkdist.php @@ -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)) {