diff mbox series

[v5,18/18] lua_interface: Forward per image aes-key

Message ID 20250905084714.25012-2-Michael.Glembotzki@iris-sensing.com
State Changes Requested
Delegated to: Stefano Babic
Headers show
Series Add support for asymmetric decryption | expand

Commit Message

Michael Glembotzki Sept. 5, 2025, 8:47 a.m. UTC
Fixes: 9c9aa3ca
Fixes: 82e825c7

Signed-off-by: Michael Glembotzki <Michael.Glembotzki@iris-sensing.com>
---
 corelib/lua_interface.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Stefano Babic Sept. 8, 2025, 10:19 a.m. UTC | #1
On 9/5/25 10:47, Michael Glembotzki wrote:
> Fixes: 9c9aa3ca
> Fixes: 82e825c7
> 

These make no sense to me.

> Signed-off-by: Michael Glembotzki <Michael.Glembotzki@iris-sensing.com>
> ---
>   corelib/lua_interface.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/corelib/lua_interface.c b/corelib/lua_interface.c
> index 1ff3e5e4..6543dff7 100644
> --- a/corelib/lua_interface.c
> +++ b/corelib/lua_interface.c
> @@ -330,7 +330,9 @@ static void lua_string_to_img(struct img_type *img, const char *key,
>   	if (!strcmp(key, "ivt"))
>   		strncpy(img->ivt_ascii, value,
>   			sizeof(img->ivt_ascii));
> -
> +	if (!strcmp(key, "aes-key"))
> +		strncpy(img->aes_ascii, value,
> +			sizeof(img->aes_ascii));
>   	if (!strncmp(key, offset, sizeof(offset))) {
>   		strncpy(seek_str, value,
>   			sizeof(seek_str));
> @@ -514,6 +516,7 @@ static void update_table(lua_State* L, struct img_type *img)
>   		LUA_PUSH_IMG_STRING(img, "data", type_data);
>   		LUA_PUSH_IMG_STRING(img, "filesystem", filesystem);
>   		LUA_PUSH_IMG_STRING(img, "ivt", ivt_ascii);
> +		LUA_PUSH_IMG_STRING(img, "aes-key", aes_ascii);
>   
>   		LUA_PUSH_IMG_BOOL(img, "installed_directly", install_directly);
>   		LUA_PUSH_IMG_BOOL(img, "install_if_different", id.install_if_different);


Regards,
Stefano
Michael Glembotzki Sept. 8, 2025, 11:15 a.m. UTC | #2
Hi Stefano,
Stefano Babic schrieb am Montag, 8. September 2025 um 12:19:17 UTC+2:

On 9/5/25 10:47, Michael Glembotzki wrote: 
> Fixes: 9c9aa3ca 
> Fixes: 82e825c7 
> 

These make no sense to me.

17/18 and 18/18 are fixup commit in my tree :/. I sent them one day after 
v5. The reference makes no sense.
I will squash them on v6.

Best regards,
Michael
 

> Signed-off-by: Michael Glembotzki <Michael.G...@iris-sensing.com> 
> --- 
> corelib/lua_interface.c | 5 ++++- 
> 1 file changed, 4 insertions(+), 1 deletion(-) 
> 
> diff --git a/corelib/lua_interface.c b/corelib/lua_interface.c 
> index 1ff3e5e4..6543dff7 100644 
> --- a/corelib/lua_interface.c 
> +++ b/corelib/lua_interface.c 
> @@ -330,7 +330,9 @@ static void lua_string_to_img(struct img_type *img, 
const char *key, 
> if (!strcmp(key, "ivt")) 
> strncpy(img->ivt_ascii, value, 
> sizeof(img->ivt_ascii)); 
> - 
> + if (!strcmp(key, "aes-key")) 
> + strncpy(img->aes_ascii, value, 
> + sizeof(img->aes_ascii)); 
> if (!strncmp(key, offset, sizeof(offset))) { 
> strncpy(seek_str, value, 
> sizeof(seek_str)); 
> @@ -514,6 +516,7 @@ static void update_table(lua_State* L, struct 
img_type *img) 
> LUA_PUSH_IMG_STRING(img, "data", type_data); 
> LUA_PUSH_IMG_STRING(img, "filesystem", filesystem); 
> LUA_PUSH_IMG_STRING(img, "ivt", ivt_ascii); 
> + LUA_PUSH_IMG_STRING(img, "aes-key", aes_ascii); 
> 
> LUA_PUSH_IMG_BOOL(img, "installed_directly", install_directly); 
> LUA_PUSH_IMG_BOOL(img, "install_if_different", id.install_if_different); 


Regards, 
Stefano
Stefano Babic Sept. 8, 2025, 11:40 a.m. UTC | #3
Hi Michael,

On 08.09.25 13:15, Michael Glembotzki wrote:
> Hi Stefano,
> Stefano Babic schrieb am Montag, 8. September 2025 um 12:19:17 UTC+2:
> 
>     On 9/5/25 10:47, Michael Glembotzki wrote:
>      > Fixes: 9c9aa3ca
>      > Fixes: 82e825c7
>      >
> 
>     These make no sense to me.
> 
> 17/18 and 18/18 are fixup commit in my tree :/. I sent them one day 
> after v5. The reference makes no sense.
> I will squash them on v6.

Ok

Best regards,
Stefano

> 
> Best regards,
> Michael
> 
>      > Signed-off-by: Michael Glembotzki <Michael.G...@iris-sensing.com>
>      > ---
>      > corelib/lua_interface.c | 5 ++++-
>      > 1 file changed, 4 insertions(+), 1 deletion(-)
>      >
>      > diff --git a/corelib/lua_interface.c b/corelib/lua_interface.c
>      > index 1ff3e5e4..6543dff7 100644
>      > --- a/corelib/lua_interface.c
>      > +++ b/corelib/lua_interface.c
>      > @@ -330,7 +330,9 @@ static void lua_string_to_img(struct img_type
>     *img, const char *key,
>      > if (!strcmp(key, "ivt"))
>      > strncpy(img->ivt_ascii, value,
>      > sizeof(img->ivt_ascii));
>      > -
>      > + if (!strcmp(key, "aes-key"))
>      > + strncpy(img->aes_ascii, value,
>      > + sizeof(img->aes_ascii));
>      > if (!strncmp(key, offset, sizeof(offset))) {
>      > strncpy(seek_str, value,
>      > sizeof(seek_str));
>      > @@ -514,6 +516,7 @@ static void update_table(lua_State* L, struct
>     img_type *img)
>      > LUA_PUSH_IMG_STRING(img, "data", type_data);
>      > LUA_PUSH_IMG_STRING(img, "filesystem", filesystem);
>      > LUA_PUSH_IMG_STRING(img, "ivt", ivt_ascii);
>      > + LUA_PUSH_IMG_STRING(img, "aes-key", aes_ascii);
>      >
>      > LUA_PUSH_IMG_BOOL(img, "installed_directly", install_directly);
>      > LUA_PUSH_IMG_BOOL(img, "install_if_different",
>     id.install_if_different);
> 
> 
>     Regards,
>     Stefano
> 
> -- 
> You received this message because you are subscribed to the Google 
> Groups "swupdate" group.
> To unsubscribe from this group and stop receiving emails from it, send 
> an email to swupdate+unsubscribe@googlegroups.com 
> <mailto:swupdate+unsubscribe@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/ 
> swupdate/2ee502e0-a03a-49ec-832c-00131d1fd9c5n%40googlegroups.com 
> <https://groups.google.com/d/msgid/swupdate/2ee502e0- 
> a03a-49ec-832c-00131d1fd9c5n%40googlegroups.com? 
> utm_medium=email&utm_source=footer>.
diff mbox series

Patch

diff --git a/corelib/lua_interface.c b/corelib/lua_interface.c
index 1ff3e5e4..6543dff7 100644
--- a/corelib/lua_interface.c
+++ b/corelib/lua_interface.c
@@ -330,7 +330,9 @@  static void lua_string_to_img(struct img_type *img, const char *key,
 	if (!strcmp(key, "ivt"))
 		strncpy(img->ivt_ascii, value,
 			sizeof(img->ivt_ascii));
-
+	if (!strcmp(key, "aes-key"))
+		strncpy(img->aes_ascii, value,
+			sizeof(img->aes_ascii));
 	if (!strncmp(key, offset, sizeof(offset))) {
 		strncpy(seek_str, value,
 			sizeof(seek_str));
@@ -514,6 +516,7 @@  static void update_table(lua_State* L, struct img_type *img)
 		LUA_PUSH_IMG_STRING(img, "data", type_data);
 		LUA_PUSH_IMG_STRING(img, "filesystem", filesystem);
 		LUA_PUSH_IMG_STRING(img, "ivt", ivt_ascii);
+		LUA_PUSH_IMG_STRING(img, "aes-key", aes_ascii);
 
 		LUA_PUSH_IMG_BOOL(img, "installed_directly", install_directly);
 		LUA_PUSH_IMG_BOOL(img, "install_if_different", id.install_if_different);