oid_registry.c (c441bfb5f2866de71e092c1b9d866a65978dfe1a) | oid_registry.c (9dbbc3b9d09d6deba9f3b9e1d5b355032ed46a75) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* ASN.1 Object identifier (OID) registry 3 * 4 * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved. 5 * Written by David Howells (dhowells@redhat.com) 6 */ 7 8#include <linux/module.h> --- 110 unchanged lines hidden (view full) --- 119/* 120 * sprint_OID - Print an Object Identifier into a buffer 121 * @data: The encoded OID to print 122 * @datasize: The size of the encoded OID 123 * @buffer: The buffer to render into 124 * @bufsize: The size of the buffer 125 * 126 * The OID is rendered into the buffer in "a.b.c.d" format and the number of | 1// SPDX-License-Identifier: GPL-2.0-or-later 2/* ASN.1 Object identifier (OID) registry 3 * 4 * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved. 5 * Written by David Howells (dhowells@redhat.com) 6 */ 7 8#include <linux/module.h> --- 110 unchanged lines hidden (view full) --- 119/* 120 * sprint_OID - Print an Object Identifier into a buffer 121 * @data: The encoded OID to print 122 * @datasize: The size of the encoded OID 123 * @buffer: The buffer to render into 124 * @bufsize: The size of the buffer 125 * 126 * The OID is rendered into the buffer in "a.b.c.d" format and the number of |
127 * bytes is returned. -EBADMSG is returned if the data could not be intepreted | 127 * bytes is returned. -EBADMSG is returned if the data could not be interpreted |
128 * and -ENOBUFS if the buffer was too small. 129 */ 130int sprint_oid(const void *data, size_t datasize, char *buffer, size_t bufsize) 131{ 132 const unsigned char *v = data, *end = v + datasize; 133 unsigned long num; 134 unsigned char n; 135 size_t ret; --- 64 unchanged lines hidden --- | 128 * and -ENOBUFS if the buffer was too small. 129 */ 130int sprint_oid(const void *data, size_t datasize, char *buffer, size_t bufsize) 131{ 132 const unsigned char *v = data, *end = v + datasize; 133 unsigned long num; 134 unsigned char n; 135 size_t ret; --- 64 unchanged lines hidden --- |