crypto/asymmetric_keys/pgp_public_key.c
0 → 100644
+349
−0
Loading
euleros inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I91FSN CVE: NA ------------------------------------------------- Implement a PGP data parser for the crypto key type to use when instantiating a key. This parser attempts to parse the instantiation data as a PGP packet sequence (RFC 4880) and if it parses okay, attempts to extract a public-key algorithm key or subkey from it. If it finds such a key, it will set up a public_key subtype payload with appropriate handler routines (DSA or RSA) and attach it to the key. Thanks to Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> for pointing out some errors. Changelog v0: - remove declaration of pgp_to_public_key_algo (Roberto Sassu) - replace prep->type_data with prep->payload.data (Roberto Sassu) - replace public_key_destroy() with public_key_free() (Roberto Sassu) - use asymmetric_key_generate_id() to generate the key identifiers (Roberto Sassu) - add raw_fingerprint to pgp_key_data_parse_context structure (Roberto Sassu) - replace algorithm identifiers with strings (Roberto Sassu) - don't parse MPIs (Roberto Sassu) - don't process Public-Subkey packets (only one key will be created) (Roberto Sassu) v5: - fix checkpatch warning MISSING_EOF_NEWLINE in pgp_public_key.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>