blob: 7e877214aa8a4f64d0ce7da1e68dbc98f3aa753e [file] [log] [blame]
AKASHI Takahirocbb10072019-11-13 09:44:58 +09001# SPDX-License-Identifier: GPL-2.0+
2#
3# Makefile for asymmetric cryptographic keys
4#
5
Philippe Reynesef064692022-03-28 22:56:57 +02006obj-$(CONFIG_$(SPL_)ASYMMETRIC_KEY_TYPE) += asymmetric_keys.o
AKASHI Takahirocbb10072019-11-13 09:44:58 +09007
8asymmetric_keys-y := asymmetric_type.o
9
Raymond Maof5e04a22024-10-03 14:50:29 -070010obj-$(CONFIG_$(SPL_)ASYMMETRIC_PUBLIC_KEY_SUBTYPE) += public_key_helper.o
11obj-$(CONFIG_$(SPL_)ASYMMETRIC_PUBLIC_KEY_LEGACY) += public_key.o
AKASHI Takahiro42142842019-11-13 09:44:59 +090012
13#
14# RSA public key parser
15#
Philippe Reynesef064692022-03-28 22:56:57 +020016obj-$(CONFIG_$(SPL_)RSA_PUBLIC_KEY_PARSER) += rsa_public_key.o
AKASHI Takahiro42142842019-11-13 09:44:59 +090017rsa_public_key-y := \
18 rsapubkey.asn1.o \
19 rsa_helper.o
20
21$(obj)/rsapubkey.asn1.o: $(obj)/rsapubkey.asn1.c $(obj)/rsapubkey.asn1.h
Philippe Reynesef064692022-03-28 22:56:57 +020022ifdef CONFIG_SPL_BUILD
23CFLAGS_rsapubkey.asn1.o += -I$(obj)
24endif
25
AKASHI Takahiro42142842019-11-13 09:44:59 +090026$(obj)/rsa_helper.o: $(obj)/rsapubkey.asn1.h
Philippe Reynesef064692022-03-28 22:56:57 +020027ifdef CONFIG_SPL_BUILD
28CFLAGS_rsa_helper.o += -I$(obj)
29endif
AKASHI Takahiro591535c2019-11-13 09:45:00 +090030
31#
32# X.509 Certificate handling
33#
Philippe Reynesef064692022-03-28 22:56:57 +020034obj-$(CONFIG_$(SPL_)X509_CERTIFICATE_PARSER) += x509_key_parser.o
AKASHI Takahiro591535c2019-11-13 09:45:00 +090035x509_key_parser-y := \
36 x509.asn1.o \
37 x509_akid.asn1.o \
38 x509_cert_parser.o \
Raymond Mao0d2d4b02024-10-03 14:50:26 -070039 x509_helper.o \
AKASHI Takahiro591535c2019-11-13 09:45:00 +090040 x509_public_key.o
41
42$(obj)/x509_cert_parser.o: \
43 $(obj)/x509.asn1.h \
44 $(obj)/x509_akid.asn1.h
45
46$(obj)/x509.asn1.o: $(obj)/x509.asn1.c $(obj)/x509.asn1.h
47$(obj)/x509_akid.asn1.o: $(obj)/x509_akid.asn1.c $(obj)/x509_akid.asn1.h
AKASHI Takahiro5ace6ff2019-11-13 09:45:01 +090048
49#
50# PKCS#7 message handling
51#
Philippe Reynesef064692022-03-28 22:56:57 +020052obj-$(CONFIG_$(SPL_)PKCS7_MESSAGE_PARSER) += pkcs7_message.o
AKASHI Takahiro5ace6ff2019-11-13 09:45:01 +090053pkcs7_message-y := \
54 pkcs7.asn1.o \
Raymond Mao1c432cb2024-10-03 14:50:27 -070055 pkcs7_helper.o \
AKASHI Takahiro5ace6ff2019-11-13 09:45:01 +090056 pkcs7_parser.o
Philippe Reynesef064692022-03-28 22:56:57 +020057obj-$(CONFIG_$(SPL_)PKCS7_VERIFY) += pkcs7_verify.o
AKASHI Takahiro5ace6ff2019-11-13 09:45:01 +090058
59$(obj)/pkcs7_parser.o: $(obj)/pkcs7.asn1.h
60$(obj)/pkcs7.asn1.o: $(obj)/pkcs7.asn1.c $(obj)/pkcs7.asn1.h
AKASHI Takahirofea4c842022-07-05 14:48:11 +090061
62#
63# Signed PE binary-wrapped key handling
64#
65obj-$(CONFIG_$(SPL_)MSCODE_PARSER) += mscode.o
66
67mscode-y := \
68 mscode_parser.o \
69 mscode.asn1.o
70
71$(obj)/mscode_parser.o: $(obj)/mscode.asn1.h $(obj)/mscode.asn1.h
72$(obj)/mscode.asn1.o: $(obj)/mscode.asn1.c $(obj)/mscode.asn1.h