Skip to content

Commit

Permalink
rimage: ace signing functions need openssl 3.0 guards
Browse files Browse the repository at this point in the history
Ace signing functions need guards for not to use deprecated openssl
functions and thus fail the compilation. Openssl3 implementation
needs to be done as the added stub now returns just -EINVAL.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
  • Loading branch information
Jaska Uimonen authored and lgirdwood committed Jun 17, 2022
1 parent 73a9d7c commit 02abc5d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/pkcs1_5.c
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,7 @@ int pkcs_v1_5_sign_man_v1_8(struct image *image,
* extensions, and excluding the last 3 fields of the
* manifest header (Public Key, Exponent and Signature).
*/
#if OPENSSL_VERSION_NUMBER < 0x30000000L
int pkcs_v1_5_sign_man_ace_v1_5(struct image *image,
struct fw_image_manifest_ace_v1_5 *man,
void *ptr1, unsigned int size1, void *ptr2,
Expand Down Expand Up @@ -624,6 +625,15 @@ int pkcs_v1_5_sign_man_ace_v1_5(struct image *image,
EVP_PKEY_free(privkey);
return ret;
}
#else
int pkcs_v1_5_sign_man_ace_v1_5(struct image *image,
struct fw_image_manifest_ace_v1_5 *man,
void *ptr1, unsigned int size1, void *ptr2,
unsigned int size2)
{
return -EINVAL;
}
#endif

int pkcs_v1_5_sign_man_v2_5(struct image *image,
struct fw_image_manifest_v2_5 *man,
Expand Down

0 comments on commit 02abc5d

Please sign in to comment.