Fix broken commands in Working with kernel modules

This commit is contained in:
Petr Bokoč 2019-05-16 02:59:47 +02:00
commit 4f25ad2148

View file

@ -548,9 +548,9 @@ EOF
[subs="attributes"]
----
~]#{nbsp}openssl req -x509 -new -nodes -utf8 -sha256 -days 36500 \
> -batch -config configuration_file.config -outform DER \
> -out public_key.der \
> -keyout private_key.priv
-batch -config configuration_file.config -outform DER \
-out public_key.der \
-keyout private_key.priv
----
. Enroll your public key on all systems where you want to authenticate and load your kernel module.
@ -622,10 +622,10 @@ There are no extra steps required to prepare your kernel module for signing. You
[subs="attributes"]
----
~]#{nbsp}perl /usr/src/kernels/$(uname -r)/scripts/sign-file \
> sha256 \
> my_signing_key.priv \
> my_signing_key_pub.der \
> my_module.ko
sha256 \
my_signing_key.priv \
my_signing_key_pub.der \
my_module.ko
----
Your kernel module is in ELF image format and this script computes and appends the signature directly to the ELF image in your `my_module.ko` file. The [command]#modinfo# utility can be used to display information about the kernel module's signature, if it is present. For information on using the utility, see xref:Working_with_Kernel_Modules.adoc#sec-Displaying_Information_About_a_Module[Displaying Information About a Module].