blob: bec1bc95a65864fb3a6c935f1efd3eb2ec9fdc99 [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
Philippe Reynesef064692022-03-28 22:56:57 +020010obj-$(CONFIG_$(SPL_)ASYMMETRIC_PUBLIC_KEY_SUBTYPE) += public_key.o
AKASHI Takahiro42142842019-11-13 09:44:59 +090011
12#
13# RSA public key parser
14#
Philippe Reynesef064692022-03-28 22:56:57 +020015obj-$(CONFIG_$(SPL_)RSA_PUBLIC_KEY_PARSER) += rsa_public_key.o
AKASHI Takahiro42142842019-11-13 09:44:59 +090016rsa_public_key-y := \
17 rsapubkey.asn1.o \
18 rsa_helper.o
19
20$(obj)/rsapubkey.asn1.o: $(obj)/rsapubkey.asn1.c $(obj)/rsapubkey.asn1.h
Philippe Reynesef064692022-03-28 22:56:57 +020021ifdef CONFIG_SPL_BUILD
22CFLAGS_rsapubkey.asn1.o += -I$(obj)
23endif
24
AKASHI Takahiro42142842019-11-13 09:44:59 +090025$(obj)/rsa_helper.o: $(obj)/rsapubkey.asn1.h
Philippe Reynesef064692022-03-28 22:56:57 +020026ifdef CONFIG_SPL_BUILD
27CFLAGS_rsa_helper.o += -I$(obj)
28endif
AKASHI Takahiro591535c2019-11-13 09:45:00 +090029
30#
31# X.509 Certificate handling
32#
Philippe Reynesef064692022-03-28 22:56:57 +020033obj-$(CONFIG_$(SPL_)X509_CERTIFICATE_PARSER) += x509_key_parser.o
AKASHI Takahiro591535c2019-11-13 09:45:00 +090034x509_key_parser-y := \
35 x509.asn1.o \
36 x509_akid.asn1.o \
37 x509_cert_parser.o \
38 x509_public_key.o
39
40$(obj)/x509_cert_parser.o: \
41 $(obj)/x509.asn1.h \
42 $(obj)/x509_akid.asn1.h
43
44$(obj)/x509.asn1.o: $(obj)/x509.asn1.c $(obj)/x509.asn1.h
45$(obj)/x509_akid.asn1.o: $(obj)/x509_akid.asn1.c $(obj)/x509_akid.asn1.h
AKASHI Takahiro5ace6ff2019-11-13 09:45:01 +090046
47#
48# PKCS#7 message handling
49#
Philippe Reynesef064692022-03-28 22:56:57 +020050obj-$(CONFIG_$(SPL_)PKCS7_MESSAGE_PARSER) += pkcs7_message.o
AKASHI Takahiro5ace6ff2019-11-13 09:45:01 +090051pkcs7_message-y := \
52 pkcs7.asn1.o \
53 pkcs7_parser.o
Philippe Reynesef064692022-03-28 22:56:57 +020054obj-$(CONFIG_$(SPL_)PKCS7_VERIFY) += pkcs7_verify.o
AKASHI Takahiro5ace6ff2019-11-13 09:45:01 +090055
56$(obj)/pkcs7_parser.o: $(obj)/pkcs7.asn1.h
57$(obj)/pkcs7.asn1.o: $(obj)/pkcs7.asn1.c $(obj)/pkcs7.asn1.h
AKASHI Takahirofea4c842022-07-05 14:48:11 +090058
59#
60# Signed PE binary-wrapped key handling
61#
62obj-$(CONFIG_$(SPL_)MSCODE_PARSER) += mscode.o
63
64mscode-y := \
65 mscode_parser.o \
66 mscode.asn1.o
67
68$(obj)/mscode_parser.o: $(obj)/mscode.asn1.h $(obj)/mscode.asn1.h
69$(obj)/mscode.asn1.o: $(obj)/mscode.asn1.c $(obj)/mscode.asn1.h