Skip to content

Commit

Permalink
Fix openssl missing cert bug for Linux & macOS (#581)
Browse files Browse the repository at this point in the history
* Fix openssl missing cert bug for linux

* Fix openssl missing cert bug for macOS
  • Loading branch information
crazywhalecc authored Dec 24, 2024
1 parent 944f4af commit 4b16631
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/SPC/builder/linux/library/openssl.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public function build(): void
"{$env} ./Configure no-shared {$extra} " .
'--prefix=/ ' .
'--libdir=lib ' .
'--openssldir=/etc/ssl ' .
'-static ' .
"{$zlib_extra}" .
'no-legacy ' .
Expand Down
2 changes: 1 addition & 1 deletion src/SPC/builder/macos/library/openssl.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ protected function build(): void
"./Configure no-shared {$extra} " .
'--prefix=/ ' . // use prefix=/
"--libdir={$lib} " .
'--openssldir=/System/Library/OpenSSL ' .
'--openssldir=/etc/ssl ' .
"darwin64-{$this->builder->getOption('arch')}-cc"
)
->exec('make clean')
Expand Down
1 change: 1 addition & 0 deletions src/globals/ext-tests/openssl.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@

assert(function_exists('openssl_digest'));
assert(openssl_digest('123456', 'md5') === 'e10adc3949ba59abbe56e057f20f883e');
assert(file_get_contents('https://example.com/') !== false);
6 changes: 3 additions & 3 deletions src/globals/test-extensions.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
$upx = false;

// prefer downloading pre-built packages to speed up the build process
$prefer_pre_built = true;
$prefer_pre_built = false;

// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
$extensions = match (PHP_OS_FAMILY) {
'Linux', 'Darwin' => 'imagick',
'Windows' => 'zlib',
'Linux', 'Darwin' => 'openssl',
'Windows' => 'openssl',
};

// If you want to test lib-suggests feature with extension, add them below (comma separated, example `libwebp,libavif`).
Expand Down

0 comments on commit 4b16631

Please sign in to comment.