Skip to content

Commit

Permalink
Added test for openssl
Browse files Browse the repository at this point in the history
  • Loading branch information
alexw23 committed May 5, 2024
1 parent 185ae0e commit 23e9cb9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/test_2_extensions.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,18 @@
'curl-openssl-certificates-location' => openssl_get_cert_locations()['default_cert_file'] === '/opt/bref/ssl/cert.pem',
// Make sure we are using curl with our compiled libssh
'curl-libssh' => version_compare(str_replace('libssh2/', '', curl_version()['libssh_version']), '1.10.0', '>='),
'openssl' => (function() {
$private_key = openssl_pkey_new();
if ($private_key === false) {
return false;
}

$private_key = openssl_pkey_new();
$public_key_pem = openssl_pkey_get_details($private_key)['key'];
$public_key = openssl_pkey_get_public($public_key_pem);
$details = openssl_pkey_get_details($public_key);
return $details !== false;
})(),
'json' => function_exists('json_encode'),
'bcmath' => function_exists('bcadd'),
'ctype' => function_exists('ctype_digit'),
Expand Down

0 comments on commit 23e9cb9

Please sign in to comment.