blob: 4ad1849040da150ab044d8bddab496523ac3fb51 [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 \
40 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 \
55 pkcs7_parser.o
Philippe Reynesef064692022-03-28 22:56:57 +020056obj-$(CONFIG_$(SPL_)PKCS7_VERIFY) += pkcs7_verify.o
AKASHI Takahiro5ace6ff2019-11-13 09:45:01 +090057
58$(obj)/pkcs7_parser.o: $(obj)/pkcs7.asn1.h
59$(obj)/pkcs7.asn1.o: $(obj)/pkcs7.asn1.c $(obj)/pkcs7.asn1.h
AKASHI Takahirofea4c842022-07-05 14:48:11 +090060
61#
62# Signed PE binary-wrapped key handling
63#
64obj-$(CONFIG_$(SPL_)MSCODE_PARSER) += mscode.o
65
66mscode-y := \
67 mscode_parser.o \
68 mscode.asn1.o
69
70$(obj)/mscode_parser.o: $(obj)/mscode.asn1.h $(obj)/mscode.asn1.h
71$(obj)/mscode.asn1.o: $(obj)/mscode.asn1.c $(obj)/mscode.asn1.h