lib: rsa: fix compile warning

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I75acadbb4fe6873c7306bd953234c1fb4ef5b0d9
This commit is contained in:
Joseph Chen 2020-03-31 18:31:22 +08:00
parent 51cb481c1c
commit 242e56fad2
1 changed files with 3 additions and 1 deletions

View File

@ -388,7 +388,7 @@ static void rsa_engine_remove(ENGINE *e)
* key to sign current fit image. Then we replace the signature in fit image * key to sign current fit image. Then we replace the signature in fit image
* with a valid one. * with a valid one.
*/ */
static void gen_data2sign(const struct image_region region[], int region_count) static int gen_data2sign(const struct image_region region[], int region_count)
{ {
char *file = "data2sign.bin"; char *file = "data2sign.bin";
FILE *fd; FILE *fd;
@ -405,6 +405,8 @@ static void gen_data2sign(const struct image_region region[], int region_count)
fwrite(region[i].data, region[i].size, 1, fd); fwrite(region[i].data, region[i].size, 1, fd);
fclose(fd); fclose(fd);
return 0;
} }
static int rsa_sign_with_key(RSA *rsa, struct checksum_algo *checksum_algo, static int rsa_sign_with_key(RSA *rsa, struct checksum_algo *checksum_algo,