crypto/asymmetric_keys/pgp_preload.c
0 → 100644
+124
−0
+4
−0
Loading
euleros inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I91FSN CVE: NA ------------------------------------------------- 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. Changelog v0: - avoid Kconfig circular dependency (Roberto Sassu) - modify flags passed to key_create_or_update() (Roberto Sassu) - don't process Public-Subkey packets (Roberto Sassu) v5: - fix checkpatch warning MISSING_EOF_NEWLINE in pgp_preload.c (zhangguangzhi) Signed-off-by:David Howells <dhowells@redhat.com> Co-developed-by:
Roberto Sassu <roberto.sassu@huawei.com> Signed-off-by:
Roberto Sassu <roberto.sassu@huawei.com> Signed-off-by:
Tianxing Zhang <zhangtianxing3@huawei.com> Reviewed-by:
Jason Yan <yanaijie@huawei.com> Signed-off-by:
Zheng Zengkai <zhengzengkai@huawei.com> Signed-off-by:
zhoushuiqing <zhoushuiqing2@huawei.com> Signed-off-by:
zhangguangzhi <zhangguangzhi3@huawei.com>