KEYS: Provide a function to load keys from a PGP keyring blob
Provide a function to load keys from a PGP keyring blob for use in initialising
the module signing key keyring:
int preload_pgp_keys(const u8 *pgpdata, size_t pgpdatalen,
struct key *keyring);
Descriptions are generated from user ID notes and key fingerprints. The keys
will actually be identified by the ID calculated from the PGP data rather than
by the description, so this shouldn't be a problem.
The keys are attached to the keyring supplied.
Looking as root in /proc/keys after the module signing keyring has been loaded:
383a00c1 I------ 1 perm 1f030000 0 0 asymmetri Red Hat, Inc. dbeca166: PGP.DSA dbeca166 []
Thanks to Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> for some pointing
out some errors.
Signed-off-by: David Howells <dhowells@redhat.com>
4 files changed