aboutsummaryrefslogtreecommitdiff
path: root/include/crypto
diff options
context:
space:
mode:
authorAKASHI Takahiro2020-07-21 19:35:17 +0900
committerHeinrich Schuchardt2020-07-22 12:33:55 +0200
commitb2a1049b5c364961726add2796b6028b27008ca4 (patch)
treebe22e76abf40da55393404994009dcf1350cda63 /include/crypto
parenta58dfd29698c65a22e3956e7aae96c7ce7fdddd3 (diff)
lib: crypto: add public_key_verify_signature()
This function will be called from x509_check_for_self_signed() and pkcs7_verify_one(), which will be imported from linux in a later patch. While it does exist in linux code and has a similar functionality of rsa_verify(), it calls further linux-specific interfaces inside. That could lead to more files being imported from linux. So simply re-implement it here instead of re-using the code. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Diffstat (limited to 'include/crypto')
-rw-r--r--include/crypto/public_key.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/crypto/public_key.h b/include/crypto/public_key.h
index 436a1ee1ee6..3ba90fcc348 100644
--- a/include/crypto/public_key.h
+++ b/include/crypto/public_key.h
@@ -82,9 +82,9 @@ extern int decrypt_blob(struct kernel_pkey_params *, const void *, void *);
extern int create_signature(struct kernel_pkey_params *, const void *, void *);
extern int verify_signature(const struct key *,
const struct public_key_signature *);
+#endif /* __UBOOT__ */
int public_key_verify_signature(const struct public_key *pkey,
const struct public_key_signature *sig);
-#endif /* !__UBOOT__ */
#endif /* _LINUX_PUBLIC_KEY_H */