]> git.karo-electronics.de Git - karo-tx-linux.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>
Fri, 28 Sep 2012 05:14:54 +0000 (14:44 +0930)
commit72990fc3057e5fb2dce45008f7bed6fa0aceff06
tree3828c327e8634de78af1b375045b859302c8e00a
parent98ad56fc46ec36246953293c3bbe5c17df16a566
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>
include/linux/oid_registry.h
lib/oid_registry.c