Skip to content

Commit d1b1949

Browse files
committed
use OPENSSL_CONF directory for openssl default configuration
1 parent 64f7a35 commit d1b1949

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,16 @@ public function build(): void
5151
$zlib_extra = '';
5252
}
5353

54+
$openssl_conf = getenv('OPENSSL_CONF');
55+
$openssl_dir = $openssl_conf ? dirname($openssl_conf) : '/etc/ssl';
5456
$ex_lib = trim($ex_lib);
5557

5658
shell()->cd($this->source_dir)->initializeEnv($this)
5759
->exec(
5860
"{$env} ./Configure no-shared {$extra} " .
5961
'--prefix=' . BUILD_ROOT_PATH . ' ' .
6062
'--libdir=' . BUILD_LIB_PATH . ' ' .
61-
'--openssldir=/etc/ssl ' .
63+
"--openssldir={$openssl_dir} " .
6264
"{$zlib_extra}" .
6365
'enable-pie ' .
6466
'no-legacy ' .

0 commit comments

Comments
 (0)