alexalouit / ISPConfig-letsencrypt

Let's Encrypt support for ISPConfig
68 stars 23 forks source link

X509_check_private_key:key values mismatch #16

Open WKnak opened 8 years ago

WKnak commented 8 years ago

I was able to create Let's Encrypt SSL for a few domains right now, but I always need to try generating SSL a lot of times, because apache crashes in "emergency error", with X509_check_private_key:key values mismatch. Looking at MD5 hashes I can see they do don't match.

openssl x509 -noout -modulus -in certificate.crt | openssl md5
openssl rsa -noout -modulus -in privateKey.key | openssl md5

After trying more times I can get certificates - I removed /etc/letsencrypt/live|archive|renewal/[domain] - i get eventually same key values, or I get blocked by Let's Encrypt limits.

Since the key values mismatch can prevent Apache from restart, It will be a good precaution to implement this validation on the plugin routine, or maybe in Let's Encrypt itself.

At least for me, I never got a valid key pair in the first attempt using this plugin.