diff options
| author | Paul HENRYS <[email protected]> | 2025-02-12 10:31:21 +0100 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-02-21 08:34:21 -0600 |
| commit | 77718437862ee849bd8818c482208aaa92363c8d (patch) | |
| tree | 01f3ccf54e2920be91a56b0faf3f5e341a4bd7b1 /include | |
| parent | a9fdc7abf3d3ad7bafb53f88264c391e7789602c (diff) | |
rsa: Add rsa_verify_openssl() to use openssl for host builds
rsa_verify_openssl() is used in lib/rsa/rsa-verify.c to authenticate data
when building host tools.
Signed-off-by: Paul HENRYS <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/image.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/image.h b/include/image.h index 8a9f779d3ff..54b1557d6c6 100644 --- a/include/image.h +++ b/include/image.h @@ -1687,6 +1687,24 @@ struct sig_header_s { */ int image_pre_load(ulong addr); +#if defined(USE_HOSTCC) +/** + * rsa_verify_openssl() - Verify a signature against some data with openssl API + * + * Verify a RSA PKCS1.5/PSS signature against an expected hash. + * + * @info: Specifies the key and algorithms + * @region: Pointer to the input data + * @region_count: Number of region + * @sig: Signature + * @sig_len: Number of bytes in the signature + * Return: 0 if verified, -ve on error + */ +int rsa_verify_openssl(struct image_sign_info *info, + const struct image_region region[], int region_count, + uint8_t *sig, uint sig_len); +#endif + /** * fit_image_verify_required_sigs() - Verify signatures marked as 'required' * |
