This commit fix IPsec certificates renewal script, which is set up
as a cron job to run daily at mid night. Due to a recent change, the
name of system-loca-ca certificate was changed to system-local-ca-1
and the function that returns the time left to the certificate
expiration was not working properly.
Test Plan:
PASS: Change system date to simulate IPsec cert is about to expire,
adjust the system to work properly all pods and services needed
to run ipsec-client and run the script, verify IPsec cert,
private key and trusted CA cert are renewed, and IKE SAs and
CHILD SAs are re-established.
PASS: Change the certificate /etc/swanctl/x509ca/system-local-ca-1.crt
to simulate the IPsec trusted CA cert is different from
the system-local-ca in k8s secret, run the script, verify the
trusted CA and IPsec cert/key are renewed, and IKE SAs and CHILD
SAs are re-established.
Story: 2010940
Task: 49850
Change-Id: Iea88211221d55df763f3f86853d402fffcb58c68
Signed-off-by: Leonardo Mendes <Leonardo.MendesSantana@windriver.com>