From c0d42febb4ef752b83caab341c3fa3b18e791fdf Mon Sep 17 00:00:00 2001 From: Saku Auvinen Date: Thu, 19 Oct 2023 14:10:11 +0300 Subject: [PATCH] Fix provisioning agent crash Jira-ID: SCDI-67 Signed-off-by: Saku Auvinen --- .../src/nats/src/comms_provisioning.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/sc-mesh-secure-deployment/src/nats/src/comms_provisioning.py b/modules/sc-mesh-secure-deployment/src/nats/src/comms_provisioning.py index d6ee29208..0ac7fcb6e 100644 --- a/modules/sc-mesh-secure-deployment/src/nats/src/comms_provisioning.py +++ b/modules/sc-mesh-secure-deployment/src/nats/src/comms_provisioning.py @@ -136,7 +136,7 @@ def do_provisioning(self): client_certificate = self.__hsm_ctrl.get_certificate(self.__auth_key_id, self.__auth_key_label) server_certificate = self.__hsm_ctrl.get_certificate(self.__auth_key_id, self.__server_cert_label) - if datetime.now() < self.__reference_date: + if datetime.now() < self.__reference_date and client_certificate is not None: # Use client certificate to set system time self.__update_system_time(client_certificate.validity_start)