summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPaul HENRYS <paul.henrys_ext@softathome.com>2025-02-24 22:20:50 +0100
committerTom Rini <trini@konsulko.com>2025-02-28 16:51:01 -0600
commit942c8c8e669739d2e8dec67a7ed90158defc93ed (patch)
tree94189e2c278fa8a56d603ce6008d8084a84113f9 /include
parentdbb9e136b8c01de581a08113ae6124f484b29362 (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 <paul.henrys_ext@softathome.com>
Diffstat (limited to 'include')
-rw-r--r--include/image.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/image.h b/include/image.h
index 07912606f33..c1db8383459 100644
--- a/include/image.h
+++ b/include/image.h
@@ -1688,6 +1688,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'
*