From: Jarkko Sakkinen <jarkko@kernel.org>
To: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>,
David Howells <dhowells@redhat.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
Eric Biggers <ebiggers@google.com>,
Eric Biggers <ebiggers@kernel.org>,
Mimi Zohar <zohar@linux.ibm.com>,
Vitaly Chikunov <vt@altlinux.org>,
Gilad Ben-Yossef <gilad@benyossef.com>,
Pascal van Leeuwen <pvanleeuwen@rambus.com>,
keyrings@vger.kernel.org, linux-crypto@vger.kernel.org,
linux-kernel@vger.kernel.org,
Jia Zhang <zhang.jia@linux.alibaba.com>
Subject: Re: [PATCH v3] pkcs7: make parser enable SM2 and SM3 algorithms combination
Date: Wed, 22 Sep 2021 00:06:32 +0300 [thread overview]
Message-ID: <e1a6e006f6104aa49b01c4c3ddb0c5f1968dc708.camel@kernel.org> (raw)
In-Reply-To: <ba6bdc45-d0f1-2a33-4ccd-67c2739567a3@linux.alibaba.com>
On Sat, 2021-09-18 at 10:25 +0800, Tianjia Zhang wrote:
> ping.
>
> On 6/24/21 5:47 PM, Tianjia Zhang wrote:
> > Support parsing the message signature of the SM2 and SM3 algorithm
> > combination. This group of algorithms has been well supported. One
> > of the main users is module signature verification.
> >
> > Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
> > ---
> > crypto/asymmetric_keys/pkcs7_parser.c | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/crypto/asymmetric_keys/pkcs7_parser.c b/crypto/asymmetric_keys/pkcs7_parser.c
> > index 967329e0a07b..6cf6c4552c11 100644
> > --- a/crypto/asymmetric_keys/pkcs7_parser.c
> > +++ b/crypto/asymmetric_keys/pkcs7_parser.c
> > @@ -248,6 +248,9 @@ int pkcs7_sig_note_digest_algo(void *context, size_t hdrlen,
> > case OID_sha224:
> > ctx->sinfo->sig->hash_algo = "sha224";
> > break;
> > + case OID_sm3:
> > + ctx->sinfo->sig->hash_algo = "sm3";
> > + break;
> > default:
> > printk("Unsupported digest algo: %u\n", ctx->last_oid);
> > return -ENOPKG;
> > @@ -269,6 +272,10 @@ int pkcs7_sig_note_pkey_algo(void *context, size_t hdrlen,
> > ctx->sinfo->sig->pkey_algo = "rsa";
> > ctx->sinfo->sig->encoding = "pkcs1";
> > break;
> > + case OID_SM2_with_SM3:
> > + ctx->sinfo->sig->pkey_algo = "sm2";
> > + ctx->sinfo->sig->encoding = "raw";
> > + break;
> > default:
> > printk("Unsupported pkey algo: %u\n", ctx->last_oid);
> > return -ENOPKG;
> >
Acked-by: Jarkko Sakkinen <jarkko@kernel.org>
/Jarkko
prev parent reply other threads:[~2021-09-21 21:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-24 9:47 [PATCH v3] pkcs7: make parser enable SM2 and SM3 algorithms combination Tianjia Zhang
2021-07-08 22:30 ` Stefan Berger
2021-09-18 2:25 ` Tianjia Zhang
2021-09-21 21:06 ` Jarkko Sakkinen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e1a6e006f6104aa49b01c4c3ddb0c5f1968dc708.camel@kernel.org \
--to=jarkko@kernel.org \
--cc=davem@davemloft.net \
--cc=dhowells@redhat.com \
--cc=ebiggers@google.com \
--cc=ebiggers@kernel.org \
--cc=gilad@benyossef.com \
--cc=herbert@gondor.apana.org.au \
--cc=keyrings@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pvanleeuwen@rambus.com \
--cc=tianjia.zhang@linux.alibaba.com \
--cc=vt@altlinux.org \
--cc=zhang.jia@linux.alibaba.com \
--cc=zohar@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).