PDA

View Full Version : I keep getting a "Certificate for CentOS has expired" in my email.


Sroek
08-31-2011, 11:46 PM
################# SSL Certificate Warning ################

Certificate for hostname 'centos.x.x', in file:
/etc/pki/tls/certs/localhost.crt

The certificate needs to be renewed; this can be done
using the 'genkey' program.

Browsers will not be able to correctly connect to this
web site using SSL until the certificate is renewed.

################################################## ########
Generated by certwatch(1)

I don't know how to resolve this. I've tried using genkey to do it and it'll show that it has been renewed, but this email keeps popping up.

Could anyone provide step by step instructions on how to resolve this issue? I would be tremendously grateful.

slava
09-01-2011, 06:05 PM
Hello, this is CentOS (RHEL) related issue, use google for simple solution for it
http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=The+certificate+needs+to+be+renewed%3B+this+can+ be+doneusing+the+'genkey'+program.

You should generate new cerificate pair via genconf program (or openssl program) and install it to /etc/pki/tls/certs/localhost.crt and /etc/pki/tls/private/localhost.key

Manual for genkey http://www.centos.org/docs/5/html/5.1/Deployment_Guide/s2-secureserver-generatingkey.html

For OpenSSL use this commands

openssl genrsa -out server.key 1024
openssl req -new -key server.key -out server.csr
openssl rsa -in server.key -out signingkey.key
openssl x509 -in server.csr -out selfsigned_digicert.crt -req -signkey signingkey.key -days 3650
chmod 600 server.key
chmod 600 selfsigned_digicert.crt
cp server.key /etc/pki/tls/private/localhost.key
cp selfsigned_digicert.crt /etc/pki/tls/certs/localhost.crt

Sroek
09-02-2011, 08:40 AM
Thank you very much, sir!