summaryrefslogtreecommitdiffstats
path: root/include/crypto
Commit message (Collapse)AuthorAgeFilesLines
* lib: crypto: export and enhance pkcs7_verify_one()AKASHI Takahiro2020-07-221-1/+8
| | | | | | | | | | | | | The function, pkcs7_verify_one(), will be utilized to rework signature verification logic aiming to support intermediate certificates in "chain of trust." To do that, its function interface is expanded, adding an extra argument which is expected to return the last certificate in trusted chain. Then, this last one must further be verified with signature database, db and/or dbx. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
* lib: crypto: add public_key_verify_signature()AKASHI Takahiro2020-07-221-1/+1
| | | | | | | | | | | | | 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>
* lib/crypto: use qualified path for x509_parser.hHeinrich Schuchardt2020-07-111-1/+1
| | | | | | Use the path relative to /include for x509_parser.h in pkcs7_parser.h. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* lib/crypto, efi_loader: move some headers to include/cryptoAKASHI Takahiro2020-05-042-0/+130
| | | | | | | | | | Pkcs7_parse.h and x509_parser.h are used in UEFI subsystem, in particular, secure boot. So move them to include/crypto to avoid relative paths. Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Don't include include x509_parser.h twice. Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* lib: crypto: add pkcs7 message parserAKASHI Takahiro2019-12-061-0/+47
| | | | | | | | | | Imported from linux kernel v5.3: pkcs7.asn1 without changes pkcs7.h with changes marked as __UBOOT__ pkcs7_parser.h without changes pkcs7_parser.c with changes marked as __UBOOT__ Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
* lib: crypto: add rsa public key parserAKASHI Takahiro2019-12-061-0/+57
| | | | | | | | | Imported from linux kernel v5.3: rsapubkey.asn1 without changes rsa.h without changes rsa_helper.c with changes marked as __UBOOT__ Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
* lib: crypto: add public key utilityAKASHI Takahiro2019-12-061-0/+90
Imported from linux kernel v5.3: asymmetric-type.h with changes marked as __UBOOT__ asymmetric_type.c with changes marked as __UBOOT__ public_key.h with changes marked as __UBOOT__ public_key.c with changes marked as __UBOOT__ Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>