Skip to content

Commit 4b16631

Browse files
authored
Fix openssl missing cert bug for Linux & macOS (crazywhalecc#581)
* Fix openssl missing cert bug for linux * Fix openssl missing cert bug for macOS
1 parent 944f4af commit 4b16631

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

src/SPC/builder/linux/library/openssl.php

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ public function build(): void
6969
"{$env} ./Configure no-shared {$extra} " .
7070
'--prefix=/ ' .
7171
'--libdir=lib ' .
72+
'--openssldir=/etc/ssl ' .
7273
'-static ' .
7374
"{$zlib_extra}" .
7475
'no-legacy ' .

src/SPC/builder/macos/library/openssl.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ protected function build(): void
5454
"./Configure no-shared {$extra} " .
5555
'--prefix=/ ' . // use prefix=/
5656
"--libdir={$lib} " .
57-
'--openssldir=/System/Library/OpenSSL ' .
57+
'--openssldir=/etc/ssl ' .
5858
"darwin64-{$this->builder->getOption('arch')}-cc"
5959
)
6060
->exec('make clean')

src/globals/ext-tests/openssl.php

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44

55
assert(function_exists('openssl_digest'));
66
assert(openssl_digest('123456', 'md5') === 'e10adc3949ba59abbe56e057f20f883e');
7+
assert(file_get_contents('https://example.com/') !== false);

src/globals/test-extensions.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@
3535
$upx = false;
3636

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

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

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

0 commit comments

Comments
 (0)