[PATCH] rsa: escape pkcs11 string passed to RSA command

Sascha Hauer sha at pengutronix.de
Wed Jul 26 03:14:55 PDT 2023


On Wed, Jul 19, 2023 at 03:46:30PM +0200, Rouven Czerwinski wrote:
> Escape the pkcs11 string that can be passed to the rsatoc script.
> Otherwise the sh -c invocation for commands will interpret the pkcs11
> URI semicolon separator as the end of the command.
> 
> Fixes: b39100bcea12 ("rsa: Allow to directly compile in rsa public keys")
> 
> Signed-off-by: Rouven Czerwinski <r.czerwinski at pengutronix.de>
> ---
>  scripts/Makefile.lib | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks

Sascha

> 
> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> index f04c09f9e2..fe77c83ba2 100644
> --- a/scripts/Makefile.lib
> +++ b/scripts/Makefile.lib
> @@ -625,7 +625,7 @@ quiet_cmd_b64dec = B64DEC  $@
>  # target file.
>  quiet_cmd_rsa_keys = RSAKEY  $@
>  cmd_rsa_keys = \
> -	$(objtree)/scripts/rsatoc -o $@.tmp $(2) &&			\
> +	$(objtree)/scripts/rsatoc -o $@.tmp "$(2)" &&			\
>  	if cmp -s $@.tmp $@; then					\
>  		rm $@.tmp;						\
>  	else								\
> -- 
> 2.41.0
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list