FreePBX 16.0.40.7
We have an expired PKI certificate that I am trying to update via certman, However when I try to use the “import locally” tab I get this error:
Whoops \ Exception \ ErrorException (E_WARNING)
openssl_x509_read(): supplied parameter cannot be coerced into an X509 certificate!
/var/www/html/admin/modules/certman/Certman.class.php
"file" => $file,
"res" => $key,
"raw" => file_get_contents($file)
);
}
foreach(glob($location."/*.crt") as $file) {
if(in_array(basename($file),$cas)) {
continue;
}
$raw = file_get_contents($file);
if(empty($raw)) {
$processed[] = array(
"status" => false,
"error" => _("Certificate is empty"),
"file" => $file
);
continue;
}
$info = openssl_x509_read($raw);
foreach($keys as $key) {
if (openssl_x509_check_private_key($info, $key['res'])) {
$name = basename($file,".crt");
try {
$status = $this->importCertificate($name,$key['raw'],file_get_contents($file));
} catch(\Exception $e) {
$processed[] = array(
"status" => false,
"error" => $e->getMessage(),
"file" => $file
);
continue;
}
$success = false;
if($this->checkCertificateName($name)) {
$oldDetails = $this->getCertificateDetailsByBasename($name);
if (!empty($oldDetails) && $oldDetails['type'] == 'up') {
$this->updateCertificate($oldDetails,_("Imported from file system"));
$success = true;
}
Arguments
"openssl_x509_read(): supplied parameter cannot be coerced into an X509 certificate!"
When I try to report the error from certman as instructed on the page:
I get this:
403 Forbidden
Request forbidden by administrative rules.