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 <Tatiana.Leon@digi.com>
This commit is contained in:
Tatiana Leon 2022-11-18 14:50:12 +01:00
parent 1d813fe460
commit fd94f10c0b
1 changed files with 4 additions and 0 deletions

View File

@ -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"