diff mbox series

[meta-swupdate] remove line feed from encryption values

Message ID 20201214121321.7743-1-dev@online.ms
State Accepted
Headers show
Series [meta-swupdate] remove line feed from encryption values | expand

Commit Message

Christoph Lauer Dec. 14, 2020, 12:13 p.m. UTC
From: Christoph Lauer <christoph.lauer@xtronic.de>

The python function swupdate_extract_keys returns the encryption values key, iv and salt with a line feed ('\n') at the end, which needs to be removed.

Signed-off-by: Christoph Lauer <christoph.lauer@xtronic.de>
---
 classes/swupdate-common.bbclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--
2.17.1

Comments

Stefano Babic Dec. 14, 2020, 2:48 p.m. UTC | #1
Hi Christoph,

patch is fine, and it is tracked correctly ba patchwork. Please send
your second patch in the same way.

On 14.12.20 13:13, Christoph Lauer wrote:
> From: Christoph Lauer <christoph.lauer@xtronic.de>
> 
> The python function swupdate_extract_keys returns the encryption values key, iv and salt with a line feed ('\n') at the end, which needs to be removed.
> 
> Signed-off-by: Christoph Lauer <christoph.lauer@xtronic.de>
> ---
>  classes/swupdate-common.bbclass | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/classes/swupdate-common.bbclass b/classes/swupdate-common.bbclass
> index ae4cf9c..564700d 100644
> --- a/classes/swupdate-common.bbclass
> +++ b/classes/swupdate-common.bbclass
> @@ -30,9 +30,9 @@ def swupdate_extract_keys(keyfile_path):
>          k,v = _.split('=',maxsplit=1)
>          data[k.rstrip()] = v
> 
> -    key = data['key']
> -    iv = data['iv']
> -    salt = data['salt']
> +    key = data['key'].rstrip('\n')
> +    iv = data['iv'].rstrip('\n')
> +    salt = data['salt'].rstrip('\n')
> 
>      return key,iv,salt
> 

Acked-by: Stefano Babic <sbabic@denx.de>

Best regards,
Stefano Babic
Stefano Babic Dec. 15, 2020, 8:06 a.m. UTC | #2
Hi Christoph,

On 14.12.20 13:13, Christoph Lauer wrote:
> From: Christoph Lauer <christoph.lauer@xtronic.de>
> 
> The python function swupdate_extract_keys returns the encryption values key, iv and salt with a line feed ('\n') at the end, which needs to be removed.
> 
> Signed-off-by: Christoph Lauer <christoph.lauer@xtronic.de>
> ---
>  classes/swupdate-common.bbclass | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/classes/swupdate-common.bbclass b/classes/swupdate-common.bbclass
> index ae4cf9c..564700d 100644
> --- a/classes/swupdate-common.bbclass
> +++ b/classes/swupdate-common.bbclass
> @@ -30,9 +30,9 @@ def swupdate_extract_keys(keyfile_path):
>          k,v = _.split('=',maxsplit=1)
>          data[k.rstrip()] = v
> 
> -    key = data['key']
> -    iv = data['iv']
> -    salt = data['salt']
> +    key = data['key'].rstrip('\n')
> +    iv = data['iv'].rstrip('\n')
> +    salt = data['salt'].rstrip('\n')
> 
>      return key,iv,salt
> 

Applied to -master, -gatesgarth, -dunfell, -thud, thanks !

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/classes/swupdate-common.bbclass b/classes/swupdate-common.bbclass
index ae4cf9c..564700d 100644
--- a/classes/swupdate-common.bbclass
+++ b/classes/swupdate-common.bbclass
@@ -30,9 +30,9 @@  def swupdate_extract_keys(keyfile_path):
         k,v = _.split('=',maxsplit=1)
         data[k.rstrip()] = v

-    key = data['key']
-    iv = data['iv']
-    salt = data['salt']
+    key = data['key'].rstrip('\n')
+    iv = data['iv'].rstrip('\n')
+    salt = data['salt'].rstrip('\n')

     return key,iv,salt