[PATCH v6 3/8] lib: rsa: bring exp_len in line when generating a key_prop

Tom Rini trini at konsulko.com
Thu Jul 9 02:23:53 CEST 2020


On Thu, Jun 18, 2020 at 04:23:23PM +0200, Heiko Stuebner wrote:

> From: Heiko Stuebner <heiko.stuebner at theobroma-systems.com>
> 
> The exponent field of struct key_prop gets allocated an uint64_t,
> and the contents are positioned from the back, so an exponent of
> "0x01 0x00 0x01" becomes 0x0 0x0 0x0 0x0 0x0 0x1 0x0 0x1"
> 
> Right now rsa_gen_key_prop() allocates a uint64_t but sets exp_len
> to the size returned from the parser, while on the other hand the
> when getting the key from the devicetree exp_len always gets set to
> sizeof(uint64_t).
> 
> So bring that in line with the established code.
> 
> Signed-off-by: Heiko Stuebner <heiko.stuebner at theobroma-systems.com>
> Reviewed-by: Simon Glass <sjg at chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200708/3bbde056/attachment.sig>


More information about the U-Boot mailing list