blob: 16059088f2684df2d94da2024ade5aa7ed8ec871 [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 Mao4887c0e2024-10-03 14:50:25 -070010obj-$(CONFIG_$(SPL_)ASYMMETRIC_PUBLIC_KEY_SUBTYPE) += \
11 public_key_helper.o \
12 public_key.o
AKASHI Takahiro42142842019-11-13 09:44:59 +090013
14#
15# RSA public key parser
16#
Philippe Reynesef064692022-03-28 22:56:57 +020017obj-$(CONFIG_$(SPL_)RSA_PUBLIC_KEY_PARSER) += rsa_public_key.o
AKASHI Takahiro42142842019-11-13 09:44:59 +090018rsa_public_key-y := \
19 rsapubkey.asn1.o \
20 rsa_helper.o
21
22$(obj)/rsapubkey.asn1.o: $(obj)/rsapubkey.asn1.c $(obj)/rsapubkey.asn1.h
Philippe Reynesef064692022-03-28 22:56:57 +020023ifdef CONFIG_SPL_BUILD
24CFLAGS_rsapubkey.asn1.o += -I$(obj)
25endif
26
AKASHI Takahiro42142842019-11-13 09:44:59 +090027$(obj)/rsa_helper.o: $(obj)/rsapubkey.asn1.h
Philippe Reynesef064692022-03-28 22:56:57 +020028ifdef CONFIG_SPL_BUILD
29CFLAGS_rsa_helper.o += -I$(obj)
30endif
AKASHI Takahiro591535c2019-11-13 09:45:00 +090031
32#
33# X.509 Certificate handling
34#
Philippe Reynesef064692022-03-28 22:56:57 +020035obj-$(CONFIG_$(SPL_)X509_CERTIFICATE_PARSER) += x509_key_parser.o
AKASHI Takahiro591535c2019-11-13 09:45:00 +090036x509_key_parser-y := \
37 x509.asn1.o \
38 x509_akid.asn1.o \
39 x509_cert_parser.o \
Raymond Mao0d2d4b02024-10-03 14:50:26 -070040 x509_helper.o \
AKASHI Takahiro591535c2019-11-13 09:45:00 +090041 x509_public_key.o
42
43$(obj)/x509_cert_parser.o: \
44 $(obj)/x509.asn1.h \
45 $(obj)/x509_akid.asn1.h
46
47$(obj)/x509.asn1.o: $(obj)/x509.asn1.c $(obj)/x509.asn1.h
48$(obj)/x509_akid.asn1.o: $(obj)/x509_akid.asn1.c $(obj)/x509_akid.asn1.h
AKASHI Takahiro5ace6ff2019-11-13 09:45:01 +090049
50#
51# PKCS#7 message handling
52#
Philippe Reynesef064692022-03-28 22:56:57 +020053obj-$(CONFIG_$(SPL_)PKCS7_MESSAGE_PARSER) += pkcs7_message.o
AKASHI Takahiro5ace6ff2019-11-13 09:45:01 +090054pkcs7_message-y := \
55 pkcs7.asn1.o \
Raymond Mao1c432cb2024-10-03 14:50:27 -070056 pkcs7_helper.o \
AKASHI Takahiro5ace6ff2019-11-13 09:45:01 +090057 pkcs7_parser.o
Philippe Reynesef064692022-03-28 22:56:57 +020058obj-$(CONFIG_$(SPL_)PKCS7_VERIFY) += pkcs7_verify.o
AKASHI Takahiro5ace6ff2019-11-13 09:45:01 +090059
60$(obj)/pkcs7_parser.o: $(obj)/pkcs7.asn1.h
61$(obj)/pkcs7.asn1.o: $(obj)/pkcs7.asn1.c $(obj)/pkcs7.asn1.h
AKASHI Takahirofea4c842022-07-05 14:48:11 +090062
63#
64# Signed PE binary-wrapped key handling
65#
66obj-$(CONFIG_$(SPL_)MSCODE_PARSER) += mscode.o
67
68mscode-y := \
69 mscode_parser.o \
70 mscode.asn1.o
71
72$(obj)/mscode_parser.o: $(obj)/mscode.asn1.h $(obj)/mscode.asn1.h
73$(obj)/mscode.asn1.o: $(obj)/mscode.asn1.c $(obj)/mscode.asn1.h