Skip to content
This repository has been archived by the owner on Mar 17, 2024. It is now read-only.

Fix suppressed method #119

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions src/LEFunctions.php
Original file line number Diff line number Diff line change
@@ -84,7 +84,10 @@ public static function RSAGenerateKeys($directory, $privateKeyFile = 'private.pe
file_put_contents($privateKeyFile, $privateKey);
file_put_contents($publicKeyFile, $details['key']);

openssl_pkey_free($res);
if (version_compare(PHP_VERSION, '8.0', '<')) {
openssl_pkey_free($res);
}

}

/**
@@ -129,7 +132,9 @@ public static function ECGenerateKeys($directory, $privateKeyFile = 'private.pem
file_put_contents($privateKeyFile, $privateKey);
file_put_contents($publicKeyFile, $details['key']);

openssl_pkey_free($res);
if (version_compare(PHP_VERSION, '8.0', '<')) {
openssl_pkey_free($res);
}
}


@@ -208,7 +213,7 @@ public static function checkHTTPChallenge($domain, $token, $keyAuthorization)
curl_setopt($handle, CURLOPT_URL, $requestURL);
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
curl_setopt($handle, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false);
$response = trim(curl_exec($handle));

return (!empty($response) && $response == $keyAuthorization);
@@ -232,7 +237,7 @@ public static function checkDNSChallenge($domain, $DNSDigest)
$response = json_decode(trim(curl_exec($handle)));
if($response->Status === 0 && isset($response->Answer))
{
foreach($response->Answer as $answer)
foreach($response->Answer as $answer)
{
if($answer->type === 16)
{