]> git.baikalelectronics.ru Git - kernel.git/commit
X.509: Add utility functions to render OIDs as strings
authorDavid Howells <dhowells@redhat.com>
Fri, 21 Sep 2012 22:30:51 +0000 (23:30 +0100)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 8 Oct 2012 03:20:18 +0000 (13:50 +1030)
commitfb5551d9cc4f1483e4f4098e3f4843d866a411e8
tree78c47940a9530bf4342f258c322f8e21412f5830
parentd8fe16907c13a1859c86aabfdcf8bc5aa5be09cd
X.509: Add utility functions to render OIDs as strings

Add a pair of utility functions to render OIDs as strings.  The first takes an
encoded OID and turns it into a "a.b.c.d" form string:

int sprint_oid(const void *data, size_t datasize,
       char *buffer, size_t bufsize);

The second takes an OID enum index and calls the first on the data held
therein:

int sprint_OID(enum OID oid, char *buffer, size_t bufsize);

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
include/linux/oid_registry.h
lib/oid_registry.c