summaryrefslogtreecommitdiff
path: root/include/linux/oid_registry.h
diff options
context:
space:
mode:
authorStefan Berger <stefanb@linux.ibm.com>2021-03-17 00:07:36 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2021-03-26 11:41:58 +0300
commitd1a303e8616c5ba1260722bb9068bbc0d1704847 (patch)
treea8e974831956a7c1b73b2cb8022ee8f448cab386 /include/linux/oid_registry.h
parentc12d448ba939cafc5fe04ae93bc3f4c27b5d213c (diff)
downloadlinux-d1a303e8616c5ba1260722bb9068bbc0d1704847.tar.xz
x509: Detect sm2 keys by their parameters OID
Detect whether a key is an sm2 type of key by its OID in the parameters array rather than assuming that everything under OID_id_ecPublicKey is sm2, which is not the case. Cc: David Howells <dhowells@redhat.com> Cc: keyrings@vger.kernel.org Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> Reviewed-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com> Tested-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/linux/oid_registry.h')
-rw-r--r--include/linux/oid_registry.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/oid_registry.h b/include/linux/oid_registry.h
index b504e2f36b25..f32d91895e4d 100644
--- a/include/linux/oid_registry.h
+++ b/include/linux/oid_registry.h
@@ -121,6 +121,7 @@ enum OID {
};
extern enum OID look_up_OID(const void *data, size_t datasize);
+extern int parse_OID(const void *data, size_t datasize, enum OID *oid);
extern int sprint_oid(const void *, size_t, char *, size_t);
extern int sprint_OID(enum OID, char *, size_t);