summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaulo Alessandre <saulo.alessandre@tse.jus.br>2021-03-16 17:07:39 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2021-03-26 19:41:59 +1100
commit0e37811db79b327fce82586c6a7bb85f00c45802 (patch)
tree9e6d74c8cdfd6f85beec94bdcdd5109c9b6d2e4a
parent2ceaf2ab3fcfaa16b1dcc5a014b8650ef12322f4 (diff)
downloadlinux-crypto-0e37811db79b327fce82586c6a7bb85f00c45802.tar.gz
linux-crypto-0e37811db79b327fce82586c6a7bb85f00c45802.zip
x509: Add OID for NIST P384 and extend parser for it
Prepare the x509 parser to accept NIST P384 certificates and add the OID for ansip384r1, which is the identifier for NIST P384. Summary of changes: * crypto/asymmetric_keys/x509_cert_parser.c - prepare x509 parser to load NIST P384 * include/linux/oid_registry.h - add OID_ansip384r1 Signed-off-by: Saulo Alessandre <saulo.alessandre@tse.jus.br> Tested-by: Stefan Berger <stefanb@linux.ibm.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--crypto/asymmetric_keys/x509_cert_parser.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/asymmetric_keys/x509_cert_parser.c b/crypto/asymmetric_keys/x509_cert_parser.c
index f5d547c6..6d003096 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_ansip384r1:
+ ctx->cert->pub->pkey_algo = "ecdsa-nist-p384";
+ break;
default:
return -ENOPKG;
}