Renewing the 'localhost' Certificate: Difference between revisions

From WilliamsNet Wiki
Jump to navigation Jump to search
(Created page with "This message comes about a year after the system is first installed: <pre> ################# SSL Certificate Warning ################ Certificate for hostname 'ramandu.wil...")
 
(No difference)

Latest revision as of 01:24, 3 August 2019

This message comes about a year after the system is first installed:

################# SSL Certificate Warning ################

  Certificate for hostname 'ramandu.williams.localnet', in file (or by nickname):
     /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)

The reference to 'genkey' is cryptic and really should have a more specific command, but ...

The correct command sequence to generate the new certificate is (as root):

genkey --days 9999 --cacert 'hostname'
cd /etc/pki/tls/certs
rm localhost.crt
ln -s `hostname`.crt localhost.crt