From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko =?ISO-8859-1?Q?St=FCbner?= Date: Mon, 25 May 2020 19:18:07 +0200 Subject: [PATCH v5 3/8] lib: rsa: bring exp_len in line when generating a key_prop In-Reply-To: <20200522141937.3523692-3-heiko@sntech.de> References: <20200522141937.3523692-1-heiko@sntech.de> <20200522141937.3523692-3-heiko@sntech.de> Message-ID: <5602336.6OaamUHhzL@diego> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Am Freitag, 22. Mai 2020, 16:19:32 CEST schrieb Heiko Stuebner: > From: Heiko Stuebner > > 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 transplanting a tag from v4: Reviewed-by: Philipp Tomsich