public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH] kernel-fitimage.bbclass: add padding algorithm property in config nodes
@ 2022-07-12  7:59 LUIS ENRIQUEZ
  2022-07-12 20:55 ` [OE-core] " Alexandre Belloni
  0 siblings, 1 reply; 3+ messages in thread
From: LUIS ENRIQUEZ @ 2022-07-12  7:59 UTC (permalink / raw)
  To: openembedded-core; +Cc: LUIS ENRIQUEZ

This allows choosing padding algorithm when building fitImage. It may be pkcs-1.5 or pss.

Signed-off-by: LUIS ENRIQUEZ <luis.enriquez@se.com>
---
 meta/classes/kernel-fitimage.bbclass | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass
index 5f5e9dd444..7c0d93625b 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -56,6 +56,9 @@ FIT_HASH_ALG ?= "sha256"
 # fitImage Signature Algo
 FIT_SIGN_ALG ?= "rsa2048"
 
+# fitImage Padding Algo
+FIT_PAD_ALG ?= "pkcs-1.5"
+
 #
 # Emit the fitImage ITS header
 #
@@ -250,6 +253,7 @@ fitimage_emit_section_config() {
 
 	conf_csum="${FIT_HASH_ALG}"
 	conf_sign_algo="${FIT_SIGN_ALG}"
+	conf_padding_algo="${FIT_PAD_ALG}"
 	if [ "${UBOOT_SIGN_ENABLE}" = "1" ] ; then
 		conf_sign_keyname="${UBOOT_SIGN_KEYNAME}"
 	fi
@@ -333,6 +337,7 @@ EOF
                         signature-1 {
                                 algo = "${conf_csum},${conf_sign_algo}";
                                 key-name-hint = "${conf_sign_keyname}";
+                                padding = "${conf_padding_algo}";
 				${sign_line}
                         };
 EOF
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [OE-core] [PATCH] kernel-fitimage.bbclass: add padding algorithm property in config nodes
  2022-07-12  7:59 [PATCH] kernel-fitimage.bbclass: add padding algorithm property in config nodes LUIS ENRIQUEZ
@ 2022-07-12 20:55 ` Alexandre Belloni
  0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Belloni @ 2022-07-12 20:55 UTC (permalink / raw)
  To: Luis Enriquez; +Cc: openembedded-core, LUIS ENRIQUEZ

Hello Luis,

On 12/07/2022 09:59:08+0200, Luis Enriquez wrote:
> This allows choosing padding algorithm when building fitImage. It may be pkcs-1.5 or pss.
> 
> Signed-off-by: LUIS ENRIQUEZ <luis.enriquez@se.com>

This has to match the From: header. The solution is the either send that
from your se.com address or add an in-body From:

> ---
>  meta/classes/kernel-fitimage.bbclass | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass
> index 5f5e9dd444..7c0d93625b 100644
> --- a/meta/classes/kernel-fitimage.bbclass
> +++ b/meta/classes/kernel-fitimage.bbclass
> @@ -56,6 +56,9 @@ FIT_HASH_ALG ?= "sha256"
>  # fitImage Signature Algo
>  FIT_SIGN_ALG ?= "rsa2048"
>  
> +# fitImage Padding Algo
> +FIT_PAD_ALG ?= "pkcs-1.5"
> +
>  #
>  # Emit the fitImage ITS header
>  #
> @@ -250,6 +253,7 @@ fitimage_emit_section_config() {
>  
>  	conf_csum="${FIT_HASH_ALG}"
>  	conf_sign_algo="${FIT_SIGN_ALG}"
> +	conf_padding_algo="${FIT_PAD_ALG}"
>  	if [ "${UBOOT_SIGN_ENABLE}" = "1" ] ; then
>  		conf_sign_keyname="${UBOOT_SIGN_KEYNAME}"
>  	fi
> @@ -333,6 +337,7 @@ EOF
>                          signature-1 {
>                                  algo = "${conf_csum},${conf_sign_algo}";
>                                  key-name-hint = "${conf_sign_keyname}";
> +                                padding = "${conf_padding_algo}";
>  				${sign_line}
>                          };
>  EOF
> -- 
> 2.25.1
> 

> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#167909): https://lists.openembedded.org/g/openembedded-core/message/167909
> Mute This Topic: https://lists.openembedded.org/mt/92328664/3617179
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alexandre.belloni@bootlin.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 


-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [OE-core] [PATCH] kernel-fitimage.bbclass: add padding algorithm property in config nodes
  2022-07-13  8:28 LUIS ENRIQUEZ
@ 2022-07-15  8:11 ` Alexandre Belloni
  0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Belloni @ 2022-07-15  8:11 UTC (permalink / raw)
  To: Luis Enriquez; +Cc: openembedded-core, LUIS ENRIQUEZ

Hello,

On 13/07/2022 10:28:03+0200, Luis Enriquez wrote:
> This allows choosing padding algorithm when building fitImage. It may be pkcs-1.5 or pss.
> 
> Signed-off-by: LUIS ENRIQUEZ <luis.enriquez@se.com>
> From: LUIS ENRIQUEZ <lenriquez389@gmail.com>
> ---
>  meta/classes/kernel-fitimage.bbclass | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass
> index 5f5e9dd444..7c0d93625b 100644
> --- a/meta/classes/kernel-fitimage.bbclass
> +++ b/meta/classes/kernel-fitimage.bbclass
> @@ -56,6 +56,9 @@ FIT_HASH_ALG ?= "sha256"
>  # fitImage Signature Algo
>  FIT_SIGN_ALG ?= "rsa2048"
>  
> +# fitImage Padding Algo
> +FIT_PAD_ALG ?= "pkcs-1.5"
> +
>  #
>  # Emit the fitImage ITS header
>  #
> @@ -250,6 +253,7 @@ fitimage_emit_section_config() {
>  
>  	conf_csum="${FIT_HASH_ALG}"
>  	conf_sign_algo="${FIT_SIGN_ALG}"
> +	conf_padding_algo="${FIT_PAD_ALG}"
>  	if [ "${UBOOT_SIGN_ENABLE}" = "1" ] ; then
>  		conf_sign_keyname="${UBOOT_SIGN_KEYNAME}"
>  	fi
> @@ -333,6 +337,7 @@ EOF
>                          signature-1 {
>                                  algo = "${conf_csum},${conf_sign_algo}";
>                                  key-name-hint = "${conf_sign_keyname}";
> +                                padding = "${conf_padding_algo}";

This doesn't apply on master, because of 2b5f5e295e9a ("featimage:
refactor style"). Can you rebase? Also, did you make sure you pass the
oe-selftest?

>  				${sign_line}
>                          };
>  EOF
> -- 
> 2.25.1
> 

> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#167953): https://lists.openembedded.org/g/openembedded-core/message/167953
> Mute This Topic: https://lists.openembedded.org/mt/92328664/3617179
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alexandre.belloni@bootlin.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 


-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-07-15  8:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-12  7:59 [PATCH] kernel-fitimage.bbclass: add padding algorithm property in config nodes LUIS ENRIQUEZ
2022-07-12 20:55 ` [OE-core] " Alexandre Belloni
  -- strict thread matches above, loose matches on Subject: below --
2022-07-13  8:28 LUIS ENRIQUEZ
2022-07-15  8:11 ` [OE-core] " Alexandre Belloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox