CertSage: "Requested certificate was not found" ARI on DomainFactory webspace

I was trying to figure out how to get an ssl certificate (which apparently is good to have) on my DomainFactory webspace and came across people being successful getting one through Certsage. However after putting in my domain name and password I get the requested certificate was not found error message.
I don't know much about web development, so I'm completely lost on all of this. Would appreciate if someone could help.

My domain is: joanaalmeida.eu

I ran this command: clicked on "Acquire Certificate and Install into cPanel" in Certsage

It produced this output:
"type": "urn:ietf:params:acme:error:malformed",
"detail": "Requested certificate was not found",
"status": 404

My web server is: Apache 2.4.66

The operating system my web server runs on is: linux (can't find a version number)

My hosting provider, if applicable, is: DomainFactory

I can login to a root shell on my machine: don't know

I'm using a control panel to manage my site : cPanel 126.0 (build 38)

The version of my client is: Certsage 3.1.0

1 Like

Welcome to the Let's Encrypt Community! :slightly_smiling_face:

I'm the author of CertSage.

I'm suspecting that you have a certificate in your CertSage data directory that didn't come from Let's Encrypt's production server, so the attempt by CertSage to retrieve ACME renewal info (ARI) for that cert is failing.

It's also possible that the ARI just wasn't available yet after acquisition of the cert. Try clicking just install and see if it works. :thinking:

I'll look into this.

3 Likes

(post deleted by author)

I indeed have a certificate in the Certsage folder, though it definitely wasn't there before I clicked on acquire.
Clicking install leads to the same result. The same response as before. According to cPanel's SSL check, there's still no certificate present

1 Like

Definitely looks like an ARI issue. I'll try manually constructing the ARI link later. This standard link shows the issue:

1 Like

For now, I suggest using CertSage v3.0.2 until I can sort this out.

1 Like

with 3.0.2 it took longer and seemed more promising, but then gave me this error page:
" This page isn’t working

joanaalmeida.eu is currently unable to handle this request.

HTTP ERROR 500"
Reloading certsage keeps giving me the same page.

There is no cron job as far as I can tell and ssl checker still doesn't find a certificate.

I could try to see if I can upload the certificate manually? If I can figure it out, but it'd be good to have the cron job doing its thing

1 Like

What are the contents of the error_log file in your webroot directory where certsage.php is located?

1 Like

PHP Fatal error: Call to undefined function CertSage\intdiv()

I'm supposedly on PHP 8.3

1 Like

I think you might actually be using a PHP version below 7 since PHP has natively included intdiv in every version since 7+. The amazing part to me is that the only intdiv call in CertSage 3.0.2 was removed in CertSage 3.1.0 due to ARI implementation. :face_with_diagonal_mouth:

I will continue with my investigation into why ARI is failing for you as soon as I have the time. For now, you should be able to use CertSage 3.1.0 with a couple of minor tweaks:

  1. Comment out lines 757 and 759 (by putting // in front of each of those lines). Lines 757 and 759 should then look like:
// $response = sendRequest($url, 200);

// $ari = decodeJSON($response["body"]);
  1. Change line 767 from this:
$certificate["renewAt"]   = strtotime($ari["suggestedWindow"]["start"]);

to this:

$certificate["renewAt"]   = $certificate["validTo"];

This will make it so that your certificate will be renewed after it expires, which is not ideal, but should allow the rest of CertSage to function properly, including the certificate installation button. You can always revisit CertSage at any time before your cert expires and simply use the "acquire and install" button to renew your certificate manually. I should have a better idea what's going on before that happens.

3 Likes

That worked! Thank you.
So I'll keep an eye on Certsage updates (and/or this thread?), in case you manage to fix the ARI issue.

Really confused what's going on with the PHP version. I checked in two different places and both say 8.3, btu yeah, if that function is missing, it can't be 8.3

2 Likes

:partying_face:

Yep, keep an eye out!

Not sure what's going on with the function/version.

2 Likes

I'm getting valid ARI for your cert... :thinking:

https://acme-v02.api.letsencrypt.org/acme/renewal-info/ALUp8i2ObzHom0yteD763OkM0dI.AAY0ofPYv1hkTlPGhIAU0cA84Q

I'm now wondering if the openssl info coming from your PHP version is old/non-standard.

1 Like

That's it! 3.1.0 with no changes works now.
Based on the suspicion that for some reason an old version of PHP is running, I researched all the places where PHP version can be set. Turns out my .htaccess was for some reason overriding the PHP version with 5.6. I commented those lines out and now it works.
They may have been put in ages ago for an old wordpress install?

3 Likes

Ah! :smiley: I forgot about that old oddity! I had encountered that issue with a CertSage user a few years ago. I believe that your conclusion is correct.

This is related, IIRC:

3 Likes