Installing SSL

Hello,

I have a Debian (Lenny) machine running Apache2 + mod_ssl. I’m trying to import\install an SSL certificate but I’m running into a lot of troubles.

When starting the webserver, I get the following message:

[Wed Jul 07 05:13:53 2010] [error] Unable to configure RSA server private key
[Wed Jul 07 05:13:53 2010] [error] SSL Library Error: 185073780 error:0B080074:x509 certificate routines:X509_c
heck_private_key:key values mismatch

The strange thing is that the certificate\private key values do match:

openssl rsa -noout -modulus -in private.key | openssl md5
2c3cc1d7364a67aefc856297fe4222a9

openssl x509 -noout -modulus -in server.crt | openssl md5
2c3cc1d7364a67aefc856297fe4222a9

This same error is shown either if I import the files given by my SSL provider or even if I generate the certificate\key directly on the server (therefore I’m assuming that the problem isn’t on the certificate).

I’ll take this chance to clear up another doubt that has arise during this process. For a couple of hours (before this error) I’ve struggled to restart the server, another error:

unable to load Private Key
3078:error:0906D06C:PEM  routines:PEM_read_bio:no start line:pem_lib.c:644:Expecting: ANY PRIVATE  KEY

I solved this issue by copying the private key content into the certificate file. Is this a correct practice or should the issue be resolved in a different manner?

Thank you for the help.

Regards