Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

ERROR:

SSL error: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch

STEPS:

openssl genrsa -out SITE.TLD.key 2048
openssl req -new -key SITE.TLD.key -out SITE.TLD.csr

(send CSR to SSL site to sign)

add CERT to SITE.TLD.crt
add CA to SITE.TLD.ca

chained them:

cat SITE.TLD.crt SITE.TLD.ca > chained.cert

Any Idea what I am doing wrong? I am using LiteSpeed HTTPd

share|improve this question
add comment

2 Answers 2

First check that private key indeed matches by looking at the modulus
diff <(openssl rsa -in KEY -modulus -noout) <(openssl x509 -in CERT -modulus -noout) should produce no output

share|improve this answer
    
What happens if it does produce stuff? –  Tiffany Walker Apr 3 '13 at 5:04
    
Then it your private key don't match the certs signing key. That means that you have to find the correct key or repeat the whole process again. I.e generate a key ,csr and send it off to your certificate provider –  iddqd Apr 3 '13 at 5:13
    
I've gone through the process 4 times now. Same results. –  Tiffany Walker Apr 3 '13 at 5:21
    
Hmm it might you certificate provider then, I've only used a few but if there is online form that you use it might be that you selecting wrong certificate options. I suggest contacting their support, to make sure you doing everything right with keys and CSR you might want to generate a cert yourself openssl x509 -req -days 30 -in SITE.TLD.csr -signkey SITE.TLD.key -out YOURs.crt the check i've suggested in the answer should work then –  iddqd Apr 3 '13 at 5:35
add comment

Double check the content of your certificate.

This is probably not a solution for all, but at least it solved my problem when I got the same error.

I copy/pasted the certificate from an e-mail I got from the CA. After taking a closer look at what I actually copy pasted, I realised that every line had a leading space. After removing these everything works fine.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.