On Wed Sep 11, 2024 at 3:29 PM EEST, Roberto Sassu wrote:
> From: David Howells <dhowe...@redhat.com>
>
> Provide some PGP signature parsing helpers:
>
>  (1) A function to parse V4 signature subpackets and pass the desired ones
>      to a processor function:
>
>       int pgp_parse_sig_subpkts(const u8 *data, size_t datalen,
>                                 struct pgp_parse_sig_context *ctx);
>
>  (2) A function to parse out basic signature parameters from any PGP
>      signature such that the algorithms and public key can be selected:
>
>       int pgp_parse_sig_params(const u8 **_data, size_t *_datalen,
>                                struct pgp_sig_parameters *p);
>
> Signed-off-by: David Howells <dhowe...@redhat.com>
> Co-developed-by: Roberto Sassu <roberto.sa...@huawei.com>
> Signed-off-by: Roberto Sassu <roberto.sa...@huawei.com>
> ---
>  crypto/asymmetric_keys/pgp_library.c | 284 +++++++++++++++++++++++++++
>  crypto/asymmetric_keys/pgplib.h      |  25 +++
>  2 files changed, 309 insertions(+)
>
> diff --git a/crypto/asymmetric_keys/pgp_library.c 
> b/crypto/asymmetric_keys/pgp_library.c
> index 1b87f8af411b..a9708ccbcb81 100644
> --- a/crypto/asymmetric_keys/pgp_library.c
> +++ b/crypto/asymmetric_keys/pgp_library.c
> @@ -260,3 +260,287 @@ int pgp_parse_public_key(const u8 **_data, size_t 
> *_datalen,
>       return 0;
>  }
>  EXPORT_SYMBOL_GPL(pgp_parse_public_key);
> +
> +/**
> + * pgp_parse_sig_subpkt_header - Parse a PGP V4 signature subpacket header
                                 ()

BR, Jarkko

Reply via email to