blob: 28b91adba2aed35f830e6c6f7d356004f1d5248c [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001# SPDX-License-Identifier: GPL-2.0
David Howells964f3b32012-09-13 15:17:21 +01002#
3# Makefile for asymmetric cryptographic keys
4#
5
6obj-$(CONFIG_ASYMMETRIC_KEY_TYPE) += asymmetric_keys.o
7
David Howellscfb664f2016-04-06 16:14:26 +01008asymmetric_keys-y := \
9 asymmetric_type.o \
10 restrict.o \
11 signature.o
David Howellsa9681bf2012-09-21 23:24:55 +010012
13obj-$(CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE) += public_key.o
Denis Kenzior903be6b2018-10-09 17:48:02 +010014obj-$(CONFIG_ASYMMETRIC_TPM_KEY_SUBTYPE) += asym_tpm.o
David Howellsc26fd692012-09-24 17:11:48 +010015
16#
17# X.509 Certificate handling
18#
19obj-$(CONFIG_X509_CERTIFICATE_PARSER) += x509_key_parser.o
20x509_key_parser-y := \
Masahiro Yamada4fa8bc92018-03-23 22:04:37 +090021 x509.asn1.o \
22 x509_akid.asn1.o \
David Howellsc26fd692012-09-24 17:11:48 +010023 x509_cert_parser.o \
24 x509_public_key.o
25
David Howellsb92e6572015-07-20 21:16:26 +010026$(obj)/x509_cert_parser.o: \
Masahiro Yamada4fa8bc92018-03-23 22:04:37 +090027 $(obj)/x509.asn1.h \
28 $(obj)/x509_akid.asn1.h
Tadeusz Strukdb6c43b2016-02-02 10:08:53 -080029
Masahiro Yamada4fa8bc92018-03-23 22:04:37 +090030$(obj)/x509.asn1.o: $(obj)/x509.asn1.c $(obj)/x509.asn1.h
31$(obj)/x509_akid.asn1.o: $(obj)/x509_akid.asn1.c $(obj)/x509_akid.asn1.h
David Howellsc26fd692012-09-24 17:11:48 +010032
David Howells2e3fadb2014-07-01 16:40:19 +010033#
David Howells3c58b232018-10-09 17:47:46 +010034# PKCS#8 private key handling
35#
36obj-$(CONFIG_PKCS8_PRIVATE_KEY_PARSER) += pkcs8_key_parser.o
37pkcs8_key_parser-y := \
38 pkcs8.asn1.o \
39 pkcs8_parser.o
40
41$(obj)/pkcs8_parser.o: $(obj)/pkcs8.asn1.h
42$(obj)/pkcs8-asn1.o: $(obj)/pkcs8.asn1.c $(obj)/pkcs8.asn1.h
43
44clean-files += pkcs8.asn1.c pkcs8.asn1.h
45
46#
David Howells2e3fadb2014-07-01 16:40:19 +010047# PKCS#7 message handling
48#
49obj-$(CONFIG_PKCS7_MESSAGE_PARSER) += pkcs7_message.o
50pkcs7_message-y := \
Masahiro Yamada4fa8bc92018-03-23 22:04:37 +090051 pkcs7.asn1.o \
David Howells9f0d3312014-07-01 16:40:19 +010052 pkcs7_parser.o \
David Howells08815b62014-07-01 16:40:20 +010053 pkcs7_trust.o \
David Howells9f0d3312014-07-01 16:40:19 +010054 pkcs7_verify.o
David Howells2e3fadb2014-07-01 16:40:19 +010055
Masahiro Yamada4fa8bc92018-03-23 22:04:37 +090056$(obj)/pkcs7_parser.o: $(obj)/pkcs7.asn1.h
57$(obj)/pkcs7.asn1.o: $(obj)/pkcs7.asn1.c $(obj)/pkcs7.asn1.h
David Howells2e3fadb2014-07-01 16:40:19 +010058
David Howells22d01af2014-07-01 19:06:18 +010059#
60# PKCS#7 parser testing key
61#
62obj-$(CONFIG_PKCS7_TEST_KEY) += pkcs7_test_key.o
63pkcs7_test_key-y := \
64 pkcs7_key_type.o
David Howells26d1164b2014-07-01 16:02:51 +010065
66#
67# Signed PE binary-wrapped key handling
68#
69obj-$(CONFIG_SIGNED_PE_FILE_VERIFICATION) += verify_signed_pefile.o
70
71verify_signed_pefile-y := \
David Howells4c0b4b12014-07-01 16:02:52 +010072 verify_pefile.o \
73 mscode_parser.o \
Masahiro Yamada4fa8bc92018-03-23 22:04:37 +090074 mscode.asn1.o
David Howells4c0b4b12014-07-01 16:02:52 +010075
Masahiro Yamada4fa8bc92018-03-23 22:04:37 +090076$(obj)/mscode_parser.o: $(obj)/mscode.asn1.h $(obj)/mscode.asn1.h
77$(obj)/mscode.asn1.o: $(obj)/mscode.asn1.c $(obj)/mscode.asn1.h
Denis Kenziord5e72742018-10-09 17:48:17 +010078
79#
80# TPM private key parsing
81#
82obj-$(CONFIG_TPM_KEY_PARSER) += tpm_key_parser.o
83tpm_key_parser-y := \
84 tpm.asn1.o \
85 tpm_parser.o
86
87$(obj)/tpm_parser.o: $(obj)/tpm.asn1.h
88$(obj)/tpm.asn1.o: $(obj)/tpm.asn1.c $(obj)/tpm.asn1.h