AKASHI Takahiro | cbb1007 | 2019-11-13 09:44:58 +0900 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0+ |
| 2 | # |
| 3 | # Makefile for asymmetric cryptographic keys |
| 4 | # |
| 5 | |
Simon Glass | 86adc2e | 2024-09-29 19:49:53 -0600 | [diff] [blame] | 6 | obj-$(CONFIG_$(XPL_)ASYMMETRIC_KEY_TYPE) += asymmetric_keys.o |
AKASHI Takahiro | cbb1007 | 2019-11-13 09:44:58 +0900 | [diff] [blame] | 7 | |
| 8 | asymmetric_keys-y := asymmetric_type.o |
| 9 | |
Tom Rini | f5bea56 | 2024-10-14 13:34:06 -0600 | [diff] [blame] | 10 | obj-$(CONFIG_$(XPL_)ASYMMETRIC_PUBLIC_KEY_SUBTYPE) += public_key_helper.o |
| 11 | obj-$(CONFIG_$(XPL_)ASYMMETRIC_PUBLIC_KEY_LEGACY) += public_key.o |
AKASHI Takahiro | 4214284 | 2019-11-13 09:44:59 +0900 | [diff] [blame] | 12 | |
| 13 | # |
| 14 | # RSA public key parser |
| 15 | # |
Tom Rini | f5bea56 | 2024-10-14 13:34:06 -0600 | [diff] [blame] | 16 | obj-$(CONFIG_$(XPL_)RSA_PUBLIC_KEY_PARSER_LEGACY) += rsa_public_key.o |
AKASHI Takahiro | 4214284 | 2019-11-13 09:44:59 +0900 | [diff] [blame] | 17 | rsa_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 |
Simon Glass | 0e84d96 | 2024-09-29 19:49:50 -0600 | [diff] [blame] | 22 | ifdef CONFIG_XPL_BUILD |
Philippe Reynes | ef06469 | 2022-03-28 22:56:57 +0200 | [diff] [blame] | 23 | CFLAGS_rsapubkey.asn1.o += -I$(obj) |
| 24 | endif |
| 25 | |
AKASHI Takahiro | 4214284 | 2019-11-13 09:44:59 +0900 | [diff] [blame] | 26 | $(obj)/rsa_helper.o: $(obj)/rsapubkey.asn1.h |
Simon Glass | 0e84d96 | 2024-09-29 19:49:50 -0600 | [diff] [blame] | 27 | ifdef CONFIG_XPL_BUILD |
Philippe Reynes | ef06469 | 2022-03-28 22:56:57 +0200 | [diff] [blame] | 28 | CFLAGS_rsa_helper.o += -I$(obj) |
| 29 | endif |
AKASHI Takahiro | 591535c | 2019-11-13 09:45:00 +0900 | [diff] [blame] | 30 | |
| 31 | # |
| 32 | # X.509 Certificate handling |
| 33 | # |
Simon Glass | 86adc2e | 2024-09-29 19:49:53 -0600 | [diff] [blame] | 34 | obj-$(CONFIG_$(XPL_)X509_CERTIFICATE_PARSER) += x509_key_parser.o |
Raymond Mao | f7b522f | 2024-10-03 14:50:31 -0700 | [diff] [blame] | 35 | x509_key_parser-y := x509_helper.o |
Tom Rini | f5bea56 | 2024-10-14 13:34:06 -0600 | [diff] [blame] | 36 | x509_key_parser-$(CONFIG_$(XPL_)X509_CERTIFICATE_PARSER_LEGACY) += \ |
AKASHI Takahiro | 591535c | 2019-11-13 09:45:00 +0900 | [diff] [blame] | 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 Takahiro | 5ace6ff | 2019-11-13 09:45:01 +0900 | [diff] [blame] | 48 | |
| 49 | # |
| 50 | # PKCS#7 message handling |
| 51 | # |
Simon Glass | 86adc2e | 2024-09-29 19:49:53 -0600 | [diff] [blame] | 52 | obj-$(CONFIG_$(XPL_)PKCS7_MESSAGE_PARSER) += pkcs7_message.o |
Raymond Mao | c3dc1f8 | 2024-10-03 14:50:33 -0700 | [diff] [blame] | 53 | pkcs7_message-y := pkcs7_helper.o |
| 54 | pkcs7_message-$(CONFIG_$(SPL_)PKCS7_MESSAGE_PARSER_LEGACY) += \ |
AKASHI Takahiro | 5ace6ff | 2019-11-13 09:45:01 +0900 | [diff] [blame] | 55 | 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 Takahiro | fea4c84 | 2022-07-05 14:48:11 +0900 | [diff] [blame] | 60 | |
Tom Rini | f5bea56 | 2024-10-14 13:34:06 -0600 | [diff] [blame] | 61 | obj-$(CONFIG_$(XPL_)PKCS7_VERIFY) += pkcs7_verify.o |
Raymond Mao | c3dc1f8 | 2024-10-03 14:50:33 -0700 | [diff] [blame] | 62 | |
AKASHI Takahiro | fea4c84 | 2022-07-05 14:48:11 +0900 | [diff] [blame] | 63 | # |
| 64 | # Signed PE binary-wrapped key handling |
| 65 | # |
Tom Rini | f5bea56 | 2024-10-14 13:34:06 -0600 | [diff] [blame] | 66 | obj-$(CONFIG_$(XPL_)MSCODE_PARSER_LEGACY) += mscode.o |
AKASHI Takahiro | fea4c84 | 2022-07-05 14:48:11 +0900 | [diff] [blame] | 67 | |
| 68 | mscode-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 |