blob: 7129315393fa3204235f371e0c3bb4e6ca42c431 [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
Raymond Maof7b522f2024-10-03 14:50:31 -070035x509_key_parser-y := x509_helper.o
36x509_key_parser-$(CONFIG_$(SPL_)X509_CERTIFICATE_PARSER_LEGACY) += \
AKASHI Takahiro591535c2019-11-13 09:45:00 +090037 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
Raymond Maoc3dc1f82024-10-03 14:50:33 -070053pkcs7_message-y := pkcs7_helper.o
54pkcs7_message-$(CONFIG_$(SPL_)PKCS7_MESSAGE_PARSER_LEGACY) += \
AKASHI Takahiro5ace6ff2019-11-13 09:45:01 +090055 pkcs7.asn1.o \
56 pkcs7_parser.o
57
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
Raymond Maoc3dc1f82024-10-03 14:50:33 -070061obj-$(CONFIG_$(SPL_)PKCS7_VERIFY) += pkcs7_verify.o
62
AKASHI Takahirofea4c842022-07-05 14:48:11 +090063#
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