From e9a377093e31cd4786815ea8b641696d4aa1d8fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eivind=20J=C3=B8lsgard?= Date: Tue, 10 Dec 2024 14:56:23 +0100 Subject: [PATCH] lib: modem_key_mgmt: Add CME error code 527 - Invalid content MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add CME error code 527 - Invalid content. This is returned with mfw >= 2.0.2 if the certificate written is not valid or too large. Signed-off-by: Eivind Jølsgard (cherry picked from commit c43a9ee4b4f20161b4d364c02e0540b04cd582d9) --- lib/modem_key_mgmt/modem_key_mgmt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/modem_key_mgmt/modem_key_mgmt.c b/lib/modem_key_mgmt/modem_key_mgmt.c index e7f604dd683a..7e95a9ace307 100644 --- a/lib/modem_key_mgmt/modem_key_mgmt.c +++ b/lib/modem_key_mgmt/modem_key_mgmt.c @@ -93,6 +93,9 @@ static int translate_error(int err) case 519: /* already exists */ LOG_WRN("Key already exists"); return -EALREADY; + case 527: /* Invalid content */ + LOG_WRN("Invalid content"); + return -EINVAL; case 528: /* not allowed in power off warning */ LOG_WRN("Not allowed when power off warning is active"); return -ECANCELED;