blob: e1645e6f4d97467d87413c506ec7aeda33ef38a1 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
David Howellsb56e5a12013-08-30 16:07:30 +01002#include <linux/export.h>
3#include <linux/init.h>
4
David Howellsb56e5a12013-08-30 16:07:30 +01005 __INITRODATA
6
Hendrik Brueckner62226982013-12-05 14:48:22 +01007 .align 8
Masahiro Yamadac4df32c2018-08-19 07:34:47 +09008 .globl system_certificate_list
9system_certificate_list:
Hendrik Brueckner62226982013-12-05 14:48:22 +010010__cert_list_start:
Nayna Jain6cbdfb32021-04-09 10:35:07 -040011__module_cert_start:
Nayna Jain781a5732021-04-22 21:16:02 -040012#if defined(CONFIG_MODULE_SIG) || (defined(CONFIG_IMA_APPRAISE_MODSIG) \
13 && defined(CONFIG_MODULES))
David Howellscfc411e2015-08-14 15:20:41 +010014 .incbin "certs/signing_key.x509"
David Woodhouse770f2b92015-07-20 21:16:34 +010015#endif
Nayna Jain6cbdfb32021-04-09 10:35:07 -040016__module_cert_end:
David Howellscfc411e2015-08-14 15:20:41 +010017 .incbin "certs/x509_certificate_list"
Hendrik Brueckner62226982013-12-05 14:48:22 +010018__cert_list_end:
19
Mehmet Kayaalpc4c36102015-11-24 16:18:05 -050020#ifdef CONFIG_SYSTEM_EXTRA_CERTIFICATE
Masahiro Yamadac4df32c2018-08-19 07:34:47 +090021 .globl system_extra_cert
Mehmet Kayaalpc4c36102015-11-24 16:18:05 -050022 .size system_extra_cert, CONFIG_SYSTEM_EXTRA_CERTIFICATE_SIZE
Masahiro Yamadac4df32c2018-08-19 07:34:47 +090023system_extra_cert:
Mehmet Kayaalpc4c36102015-11-24 16:18:05 -050024 .fill CONFIG_SYSTEM_EXTRA_CERTIFICATE_SIZE, 1, 0
25
David Howells0d1db3e2016-02-29 14:44:30 +000026 .align 4
Masahiro Yamadac4df32c2018-08-19 07:34:47 +090027 .globl system_extra_cert_used
28system_extra_cert_used:
Mehmet Kayaalpc4c36102015-11-24 16:18:05 -050029 .int 0
30
31#endif /* CONFIG_SYSTEM_EXTRA_CERTIFICATE */
32
Hendrik Brueckner62226982013-12-05 14:48:22 +010033 .align 8
Masahiro Yamadac4df32c2018-08-19 07:34:47 +090034 .globl system_certificate_list_size
35system_certificate_list_size:
Hendrik Brueckner62226982013-12-05 14:48:22 +010036#ifdef CONFIG_64BIT
37 .quad __cert_list_end - __cert_list_start
38#else
39 .long __cert_list_end - __cert_list_start
40#endif
Nayna Jain6cbdfb32021-04-09 10:35:07 -040041
42 .align 8
43 .globl module_cert_size
44module_cert_size:
45#ifdef CONFIG_64BIT
46 .quad __module_cert_end - __module_cert_start
47#else
48 .long __module_cert_end - __module_cert_start
49#endif