]> git.ipfire.org Git - thirdparty/dracut.git/commit
98integrity: support loading x509 into the trusted/builtin .evm keyring
authorMatthias Gerstner <matthias.gerstner@suse.de>
Wed, 24 Jan 2018 15:58:15 +0000 (16:58 +0100)
committerHarald Hoyer <harald@hoyer.xyz>
Thu, 25 Jan 2018 11:15:36 +0000 (12:15 +0100)
commitcb02ff635c668392f9af174657b38c0baa946e98
treed364e6b276af36742e700a410a69ebb5c07a4cbc
parenta1c1be4f3e241fb7c1da414ec4910f08abd4952a
98integrity: support loading x509 into the trusted/builtin .evm keyring

This implements logic analogous to the one already implemented in
ima-keys-load.sh, only for the .evm/_evm keyrings.

If the kernel was built with CONFIG_IMA_TRUSTED_KEYRING then the kernel
initially creates and configures .ima and .evm keyrings. These keyrings
only accept x509 certificates that have been signed by a local CA which
belongs to the kernel builtin trusted keyring.

Thus if such a keyring is already present then additional evm keys
should be loaded into them. If this is not the case then the _evm
keyring needs to be created in userspace and keys will be loaded into
it instead.

Before this change dracut always created the _evm keyring and loaded
keys into it without considering an existing .evm keyring. In case of
CONFIG_IMA_TRUSTED_KEYRING being enabled, the _evm keyring will not be
used by the kernel, however, and EVM digital signatures will not work as
expected.
modules.d/98integrity/evm-enable.sh