Increasing the expiration time for SSL certificate for Exim

freshmint

Verified User
Joined
Oct 10, 2005
Messages
113
I issued a self-signed certificate for Exim by running the following commands:

Code:
openssl req -new -x509 -keyout /etc/exim.key.tmp -out /etc/exim.cert
openssl rsa -in /etc/exim.key.tmp -out /etc/exim.key
rm -f /etc/exim.key.tmp
service exim restart

The problem is the certificate expires after one month. I have already edited my /usr/share/ssl/openssl.cnf with the following lines in order to increase this expiration time to one year and it worked for the SSL certificate issued for Apache, but it has no effect on the Exim certificate.

Code:
default_days    = 365                   # how long to certify for
default_crl_days= 365                   # how long before next CRL

Should I edit another file or set it on another place? Does anyone know?
 
Try adding -days to the line so it looks like
Code:
openssl req -new -x509 -days 356 -keyout /etc/exim.key.tmp -out /etc/exim.cert
and see if that makes it the correct timespan.
 
It worked, thank you both very much (though anyone that may try the first code will notice the args order needs to be fixed).
 
Back
Top