lib: crypto: add public_key_verify_signature()
authorAKASHI Takahiro <takahiro.akashi@linaro.org>
Tue, 21 Jul 2020 10:35:17 +0000 (19:35 +0900)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Wed, 22 Jul 2020 10:33:55 +0000 (12:33 +0200)
commitb2a1049b5c364961726add2796b6028b27008ca4
treebe22e76abf40da55393404994009dcf1350cda63
parenta58dfd29698c65a22e3956e7aae96c7ce7fdddd3
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>
include/crypto/public_key.h
lib/crypto/public_key.c