Add openssl version getter for Windows, test openssl

This commit is contained in:
crazywhalecc
2025-07-30 23:23:12 +08:00
parent 5f5d934d58
commit af10cacdff
7 changed files with 72 additions and 27 deletions

View File

@@ -1,21 +0,0 @@
<?php
declare(strict_types=1);
namespace SPC\builder\unix\library;
trait openssl
{
public function getLibVersion(): ?string
{
// get openssl version from source directory
if (file_exists("{$this->source_dir}/VERSION.dat")) {
// parse as INI
$version = parse_ini_file("{$this->source_dir}/VERSION.dat");
if ($version !== false) {
return "{$version['MAJOR']}.{$version['MINOR']}.{$version['PATCH']}";
}
}
return null;
}
}