]> git.karo-electronics.de Git - karo-tx-linux.git/commit
MODSIGN: Use the same digest for the autogen key sig as for the module sig
authorDavid Howells <dhowells@redhat.com>
Fri, 28 Sep 2012 10:16:57 +0000 (11:16 +0100)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 3 Oct 2012 08:27:59 +0000 (17:57 +0930)
commit717bf60955b499bd9e16f0f309174f83d0c99ffb
treeb45275ccfe1dec0c629dc0b290146c88e2f07af3
parent541754921d398d2252266143c7a31689ef18e073
MODSIGN: Use the same digest for the autogen key sig as for the module sig

Use the same digest type for the autogenerated key signature as for the module
signature so that the hash algorithm is guaranteed to be present in the kernel.

Without this, the X.509 certificate loader may reject the X.509 certificate so
generated because it was self-signed and the signature will be checked against
itself - but this won't work if the digest algorithm must be loaded as a
module.

The symptom is that the key fails to load with the following message emitted
into the kernel log:

MODSIGN: Problem loading in-kernel X.509 certificate (-65)

the error in brackets being -ENOPKG.  What you should see is something like:

MODSIGN: Loaded cert 'Magarathea: Glacier signing key: 9588321144239a119d3406d4c4cf1fbae1836fa0'

Note that this doesn't apply to certificates that are not self-signed as we
don't check those currently as they require the parent CA certificate to be
available.

Reported-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
kernel/Makefile