summaryrefslogtreecommitdiffstats
path: root/lib/Kconfig
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2012-09-22 00:30:46 +0200
committerRusty Russell <rusty@rustcorp.com.au>2012-10-08 05:20:18 +0200
commita77ad6ea0b0bb1f9d1f52ed494bd72a5fdde208e (patch)
tree96f3bcb637dc80c7a92611237ce4a9b3f6466387 /lib/Kconfig
parentRSA: Fix signature verification for shorter signatures (diff)
downloadlinux-a77ad6ea0b0bb1f9d1f52ed494bd72a5fdde208e.tar.xz
linux-a77ad6ea0b0bb1f9d1f52ed494bd72a5fdde208e.zip
X.509: Implement simple static OID registry
Implement a simple static OID registry that allows the mapping of an encoded OID to an enum value for ease of use. The OID registry index enum appears in the: linux/oid_registry.h header file. A script generates the registry from lines in the header file that look like: <sp*>OID_foo,<sp*>/*<sp*>1.2.3.4<sp*>*/ The actual OID is taken to be represented by the numbers with interpolated dots in the comment. All other lines in the header are ignored. The registry is queries by calling: OID look_up_oid(const void *data, size_t datasize); This returns a number from the registry enum representing the OID if found or OID__NR if not. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'lib/Kconfig')
-rw-r--r--lib/Kconfig5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Kconfig b/lib/Kconfig
index bb94c1ba616a..4b31a46fb307 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -396,4 +396,9 @@ config SIGNATURE
config LIBFDT
bool
+config OID_REGISTRY
+ tristate
+ help
+ Enable fast lookup object identifier registry.
+
endmenu