1
0
Fork 0
mirror of https://github.com/u-boot/u-boot.git synced 2025-04-23 05:08:24 +00:00

lib/crypto: Adapt mscode_parser to MbedTLS

Previous patch has introduced MbedTLS porting layer for mscode parser,
here to adjust the header and makefiles accordingly.
Adding _LEGACY Kconfig for legacy mscode implementation.

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
This commit is contained in:
Raymond Mao 2024-10-03 14:50:35 -07:00 committed by Tom Rini
parent 65a7b48d5a
commit 513a15db0d
3 changed files with 14 additions and 1 deletions
include/crypto
lib
crypto
mbedtls

View file

@ -9,6 +9,10 @@
#ifndef __UBOOT__
#include <crypto/hash_info.h>
#endif
#if CONFIG_IS_ENABLED(MBEDTLS_LIB_X509)
#include <mbedtls/asn1.h>
#include <mbedtls/oid.h>
#endif
struct pefile_context {
#ifndef __UBOOT__

View file

@ -63,7 +63,7 @@ obj-$(CONFIG_$(SPL_)PKCS7_VERIFY) += pkcs7_verify.o
#
# Signed PE binary-wrapped key handling
#
obj-$(CONFIG_$(SPL_)MSCODE_PARSER) += mscode.o
obj-$(CONFIG_$(SPL_)MSCODE_PARSER_LEGACY) += mscode.o
mscode-y := \
mscode_parser.o \

View file

@ -120,6 +120,7 @@ config LEGACY_CRYPTO_CERT
ASYMMETRIC_PUBLIC_KEY_SUBTYPE
select X509_CERTIFICATE_PARSER_LEGACY if X509_CERTIFICATE_PARSER
select PKCS7_MESSAGE_PARSER_LEGACY if PKCS7_MESSAGE_PARSER
select MSCODE_PARSER_LEGACY if MSCODE_PARSER
select SPL_ASYMMETRIC_PUBLIC_KEY_LEGACY if \
SPL_ASYMMETRIC_PUBLIC_KEY_SUBTYPE
help
@ -150,6 +151,14 @@ config PKCS7_MESSAGE_PARSER_LEGACY
This option chooses legacy certificate library for PKCS7 message
parser.
config MSCODE_PARSER_LEGACY
bool "MS authenticode parser with legacy certificate library"
depends on LEGACY_CRYPTO_CERT && MSCODE_PARSER
select ASN1_DECODER_LEGACY
help
This option chooses legacy certificate library for MS authenticode
parser.
if SPL
config SPL_ASYMMETRIC_PUBLIC_KEY_LEGACY