Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp516039pxb; Thu, 25 Feb 2021 08:11:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJyrlnpD8jh8pmZaip0zI3qUKAmMEnm/KRaUeKbMWB/jJ1wd8f/lr08fgtQKjanb6HVruie9 X-Received: by 2002:aa7:ce99:: with SMTP id y25mr3629928edv.167.1614269498198; Thu, 25 Feb 2021 08:11:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614269498; cv=none; d=google.com; s=arc-20160816; b=q3Dik44fsicmgqD/+afLUlgxIw4ZE5HPIPkm80s/HtyXowgMfHqrPcFYmUOV0dXhny xT9XXnti03aPISi3QTbzeXeTPeLHvRpNT2A60TPOxayEu0W80TYOVB3003HRNP93Mdrn 9C66RuAeKa34Z1rJvMIIZzIs3bkI2c2FXa/aOzJkbh4qaW+DmJgyIfftyjBRxzAYVKu1 W3+B3zZwxnjPqhJQKxSNQoeD6QorNlDuSNweOyjPQer2cv+IP4kNkBKFJ5vU2AcYaGO5 7PQMTVzcjbg70sBI3XQEhB8/qXeHlTUzrfXmY7pHRqbUGo5SaQxm+3KHUzoHBk0/GTjn f/Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=VtF4Yw7xrfj4MWr85/dNbECLCqQJ6pR1t+mfj8tqn0M=; b=UByB5sICTa3SS2BcjzyoQe7I3mcsbfIOvLggcz1oC+OMHHrz7zJn3OQNgrtk7Ont4v J6991a8wLK50CWEXscP7afmF/ukO0e2s3k9T1JrJORMXk3ZYGh43JyBYjZ0SCGcptJtE 8CxdLCYBxWIOhxzjv2LeY07T1S2FBONUf6OPW7xG+KKLNF8hV7XeYcJQm8SmfwkYa736 KAuPkUb90egtuPzVum8N7dBnkyBo2fhZe0avG6t1LnMtCQpGz3+iVoEzZz7/3MDameB+ z6RgDfMEsM2Zy0lG/YYqKrGvxmVbRNaVNW1WkqK61ivvKy39CDytStzsSuDcnHvP929T gLEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=trHgyxcm; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i28si3467786edy.261.2021.02.25.08.11.15; Thu, 25 Feb 2021 08:11:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=trHgyxcm; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233693AbhBYQKU (ORCPT + 99 others); Thu, 25 Feb 2021 11:10:20 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:32444 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233618AbhBYQJP (ORCPT ); Thu, 25 Feb 2021 11:09:15 -0500 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 11PG3gZF143367; Thu, 25 Feb 2021 11:08:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=VtF4Yw7xrfj4MWr85/dNbECLCqQJ6pR1t+mfj8tqn0M=; b=trHgyxcm/TkQ3vW+9NquPMTLE1+Pxdii3atnxeRrpDJhIVjLuQQNRLeKIeEGVaKSFNLg Swu2jb8mn8M8YBqwpbZFPftTSk/vrS5khLz4PxSPnZrReaNgtwkv3gCDmolhLg5lcfuB HvbbqHG/gm7AWnELr4bun/T99/zTU3kT0zrfRk7U2UxIDSaXN1oH4yon2u2fT/YXSjoO hw3jhEuboeF6Br1E86vXPoH427aTILfHSLOJ+cFUFCbxW16woMCTdl+Ac0MZWohIs4YN HlPfF6l4TdB9QDmB3QFzxeYPi2fev1WNmQctbQBZuVdfAIrO3OFe97c6ObhHARUJkVKq lA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 36wy8r8uhv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Feb 2021 11:08:24 -0500 Received: from m0098413.ppops.net (m0098413.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 11PG5BxD152222; Thu, 25 Feb 2021 11:08:24 -0500 Received: from ppma03wdc.us.ibm.com (ba.79.3fa9.ip4.static.sl-reverse.com [169.63.121.186]) by mx0b-001b2d01.pphosted.com with ESMTP id 36wy8r8uh1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Feb 2021 11:08:24 -0500 Received: from pps.filterd (ppma03wdc.us.ibm.com [127.0.0.1]) by ppma03wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 11PG2A7h025293; Thu, 25 Feb 2021 16:08:22 GMT Received: from b03cxnp08028.gho.boulder.ibm.com (b03cxnp08028.gho.boulder.ibm.com [9.17.130.20]) by ppma03wdc.us.ibm.com with ESMTP id 36tt29fw0x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Feb 2021 16:08:22 +0000 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 11PG8LEb38339070 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 25 Feb 2021 16:08:21 GMT Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7ACD56E052; Thu, 25 Feb 2021 16:08:21 +0000 (GMT) Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DEED36E04C; Thu, 25 Feb 2021 16:08:20 +0000 (GMT) Received: from sbct-3.pok.ibm.com (unknown [9.47.158.153]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP; Thu, 25 Feb 2021 16:08:20 +0000 (GMT) From: Stefan Berger 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 , Stefan Berger 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 Message-Id: <20210225160802.2478700-6-stefanb@linux.vnet.ibm.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210225160802.2478700-1-stefanb@linux.vnet.ibm.com> References: <20210225160802.2478700-1-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369,18.0.761 definitions=2021-02-25_09:2021-02-24,2021-02-25 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 mlxscore=0 impostorscore=0 adultscore=0 clxscore=1015 mlxlogscore=999 malwarescore=0 lowpriorityscore=0 spamscore=0 priorityscore=1501 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102250127 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Saulo Alessandre * 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 Tested-by: Stefan Berger --- 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