hernieuw Self-signed certificaat (SSL) apache, Linux

Dit is een stappenplan wat te doen, geen uitleg.

Hernieuw Self-signed certificaat

Ga naar de locatie waar je certificaten staan.
Dat kan je vinden in de SSL config file /etc/httpd/conf.d/ssl.conf.
Zoek naar de opties: SSLCertificateFile en SSLCertificateKeyFile.
Voor mij is dus de commando

cd /etc/httpd/ssl

Check einddatum:

openssl x509 -in localhost.crt -noout -enddate

Lees huidige certificaat uit (info nodig voor signing aanvraag file):

openssl x509 -in localhost.crt -text -noout

Creeer aanvraag signing request:

openssl req -new -key localhost.key -out new.csr

Vul de info in zoals het staat in huidige certificaat.

Creeer nieuwe certificaat voor 4 jaar:

openssl x509 -req -days 1460 -in localhost.csr -signkey localhost.key -out new.crt

Oude certificaat vervangen met de nieuwe:

mv localhost.crt localhost.crt.old
mv new.crt localhost.crt

Check certificaat:

openssl verify localhost.crt