summaryrefslogtreecommitdiff
path: root/include/linux/oid_registry.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2012-09-21 23:30:51 +0100
committerRusty Russell <rusty@rustcorp.com.au>2012-10-08 13:50:18 +1030
commit4f73175d0375a7c1b3ae625e76acee8b39741f28 (patch)
tree78c47940a9530bf4342f258c322f8e21412f5830 /include/linux/oid_registry.h
parenta77ad6ea0b0bb1f9d1f52ed494bd72a5fdde208e (diff)
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>
Diffstat (limited to 'include/linux/oid_registry.h')
-rw-r--r--include/linux/oid_registry.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/oid_registry.h b/include/linux/oid_registry.h
index 5928546bf00a..6926db724258 100644
--- a/include/linux/oid_registry.h
+++ b/include/linux/oid_registry.h
@@ -86,5 +86,7 @@ enum OID {
};
extern enum OID look_up_OID(const void *data, size_t datasize);
+extern int sprint_oid(const void *, size_t, char *, size_t);
+extern int sprint_OID(enum OID, char *, size_t);
#endif /* _LINUX_OID_REGISTRY_H */