It looks like my ceritficate is corrupted. How can I fix this ?
My domain is:renooij.net
I ran this command: certbot renew
It produced this output:
Processing /etc/letsencrypt/renewal/renooij.net.conf
Encountered error while loading certificate or csr: [('PEM routines', '', 'no start line')]
Renewal configuration file /etc/letsencrypt/renewal/renooij.net.conf (cert: renooij.net) produced an unexpected error: [('PEM routines', '', 'no start line')]. Skipping.
My web server is (include version):
Apache version 2.4.56
The operating system my web server runs on is (include version):
Debian Linux 11
My hosting provider, if applicable, is:
I can login to a root shell on my machine (yes or no, or I don't know):
yes
I'm using a control panel to manage my site (no, or provide the name and version of the control panel):
no
The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):
certbot 2.10.0
I agree your certs look missing or damaged. Can you show output of these commands:
ls -l /etc/letsencrypt/live/renooij.net
sudo certbot certificates
and the contents of each file in this folder. Based on your history I am expecting to see two conf files. Please mark the names of each when you post them here
Maybe but don't just delete that file. What do you mean it has unknown ascii? The file length matches your older cert and the timestamp matches the symlink and your other files. Do you know how it got damaged then? I don't want to recreate it just to have it happen again.
But, yes, probably easier to delete and re-create. Your Apache is not using that cert (yet) and if it is damaged no one else could be either. So, deleting should be done like
sudo certbot delete --cert-name renooij.net
Then re-create it with
sudo certbot --apache -d renooij.net
It is possible the certbot delete will fail if it pre-checks the cert validity. In which case you need to delete manually:
the conf file for it in the /renewal folder (leave the other conf files there)
Neither do I, that .old file was the corrupted one containing ascii coming from some other conf file. I kept it for investigative purposes, it was not intended as a backup.