linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Berger <stefanb@linux.vnet.ibm.com>
To: keyrings@vger.kernel.org, linux-crypto@vger.kernel.org,
	davem@davemloft.net, herbert@gondor.apana.org.au,
	dhowells@redhat.com, zohar@linux.ibm.com
Cc: linux-kernel@vger.kernel.org, patrick@puiterwijk.org,
	linux-integrity@vger.kernel.org,
	Saulo Alessandre <saulo.alessandre@tse.jus.br>,
	Stefan Berger <stefanb@linux.ibm.com>
Subject: [PATCH v9 5/9] x509: Add OID for NIST P384 and extend parser for it
Date: Thu, 25 Feb 2021 11:07:58 -0500	[thread overview]
Message-ID: <20210225160802.2478700-6-stefanb@linux.vnet.ibm.com> (raw)
In-Reply-To: <20210225160802.2478700-1-stefanb@linux.vnet.ibm.com>

From: Saulo Alessandre <saulo.alessandre@tse.jus.br>

* crypto/asymmetric_keys/x509_cert_parser.c
  - prepare x509 parser to load nist_secp384r1

* include/linux/oid_registry.h
  - add OID_id_secp384r1

Signed-off-by: Saulo Alessandre <saulo.alessandre@tse.jus.br>
Tested-by: Stefan Berger <stefanb@linux.ibm.com>
---
 crypto/asymmetric_keys/x509_cert_parser.c | 3 +++
 include/linux/oid_registry.h              | 1 +
 2 files changed, 4 insertions(+)

diff --git a/crypto/asymmetric_keys/x509_cert_parser.c b/crypto/asymmetric_keys/x509_cert_parser.c
index f5d547c6dfb5..526c6a407e07 100644
--- a/crypto/asymmetric_keys/x509_cert_parser.c
+++ b/crypto/asymmetric_keys/x509_cert_parser.c
@@ -510,6 +510,9 @@ int x509_extract_key_data(void *context, size_t hdrlen,
 		case OID_id_prime256v1:
 			ctx->cert->pub->pkey_algo = "ecdsa-nist-p256";
 			break;
+		case OID_id_secp384r1:
+			ctx->cert->pub->pkey_algo = "ecdsa-nist-p384";
+			break;
 		default:
 			return -ENOPKG;
 		}
diff --git a/include/linux/oid_registry.h b/include/linux/oid_registry.h
index 3583908cf1ca..d656450dfc66 100644
--- a/include/linux/oid_registry.h
+++ b/include/linux/oid_registry.h
@@ -64,6 +64,7 @@ enum OID {
 
 	OID_certAuthInfoAccess,		/* 1.3.6.1.5.5.7.1.1 */
 	OID_sha1,			/* 1.3.14.3.2.26 */
+	OID_id_secp384r1,		/* 1.3.132.0.34 */
 	OID_sha256,			/* 2.16.840.1.101.3.4.2.1 */
 	OID_sha384,			/* 2.16.840.1.101.3.4.2.2 */
 	OID_sha512,			/* 2.16.840.1.101.3.4.2.3 */
-- 
2.29.2


  parent reply	other threads:[~2021-02-25 16:14 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-25 16:07 [PATCH v9 0/9] Add support for x509 certs with NIST P384/256/192 keys Stefan Berger
2021-02-25 16:07 ` [PATCH v9 1/9] crypto: Add support for ECDSA signature verification Stefan Berger
2021-02-25 16:07 ` [PATCH v9 2/9] x509: Detect sm2 keys by their parameters OID Stefan Berger
2021-03-03 23:46   ` Stefan Berger
2021-03-05  7:37     ` Tianjia Zhang
2021-03-05 15:04       ` Stefan Berger
2021-03-08  6:58         ` Tianjia Zhang
2021-02-25 16:07 ` [PATCH v9 3/9] x509: Add support for parsing x509 certs with ECDSA keys Stefan Berger
2021-02-25 16:07 ` [PATCH v9 4/9] ima: Support EC keys for signature verification Stefan Berger
2021-02-25 16:07 ` Stefan Berger [this message]
2021-02-25 16:07 ` [PATCH v9 6/9] crypto: Add NIST P384 curve parameters Stefan Berger
2021-03-04  5:28   ` Herbert Xu
2021-03-04 13:59     ` Stefan Berger
2021-03-04 22:31       ` Herbert Xu
2021-02-25 16:08 ` [PATCH v9 7/9] crypto: Add math to support fast NIST P384 Stefan Berger
2021-02-25 16:08 ` [PATCH v9 8/9] ecdsa: Register NIST P384 and extend test suite Stefan Berger
2021-02-25 16:08 ` [PATCH v9 9/9] certs: Add support for using elliptic curve keys for signing modules Stefan Berger
2021-02-27  3:35   ` yumeng
2021-03-01 13:11     ` Mimi Zohar
2021-03-02  1:04       ` yumeng
2021-03-01 21:19     ` Stefan Berger

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=20210225160802.2478700-6-stefanb@linux.vnet.ibm.com \
    --to=stefanb@linux.vnet.ibm.com \
    --cc=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patrick@puiterwijk.org \
    --cc=saulo.alessandre@tse.jus.br \
    --cc=stefanb@linux.ibm.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).