From fd94f10c0b7cb61472e0958910b84ed176d40052 Mon Sep 17 00:00:00 2001 From: Tatiana Leon Date: Fri, 18 Nov 2022 14:50:12 +0100 Subject: [PATCH] ccmp1: cloudconnector: use '/mnt/data' as the place to store the certificate The directory '/etc/ssl/certs' is in the 'rootfs_x' partition for dual boot or 'rootfs' for standard boot. In any case this certificate cannot be used after updating because it is stored in the other block partition (for dual boot) or because the whole partition has be re-programmed (for standard boot). So, after a firmware update the device will not be able to reconnect to DRM unless the user revokes the certificate. This commit changes the certificate directory to be '/mnt/data' where 'data' partition is mounted. This is not erased during a firmware update, so cloud connector can use the already downloaded certificate and the device is able to reconnect to DRM. Signed-off-by: Tatiana Leon --- .../recipes-digi/cloudconnector/cloudconnector_git.bb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb b/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb index 0b3d004d2..0db819f62 100644 --- a/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb +++ b/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb @@ -43,6 +43,10 @@ do_install() { ln -sf /etc/cloud-connector ${D}${sysconfdir}/init.d/cloud-connector } +do_install:append:ccmp1() { + sed -i "/client_cert_path = \"\/etc\/ssl\/certs\/drm_cert.pem\"/c\client_cert_path = \"\/mnt\/data\/drm_cert.pem\"" ${D}${sysconfdir}/cc.conf +} + INITSCRIPT_NAME = "cloud-connector" SYSTEMD_SERVICE:${PN} = "cloud-connector.service"