1 .\" $OpenBSD: d2i_ASN1_OBJECT.3,v 1.9 2018/04/25 15:17:52 schwarze Exp $
2 .\" OpenSSL 05ea606a May 20 20:52:46 2016 -0400
4 .\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
6 .\" Permission to use, copy, modify, and distribute this software for any
7 .\" purpose with or without fee is hereby granted, provided that the above
8 .\" copyright notice and this permission notice appear in all copies.
10 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 .Dd $Mdocdate: April 25 2018 $
24 .Nd decode and encode ASN.1 object identifiers
29 .Fa "ASN1_OBJECT **val_out"
30 .Fa "unsigned char **der_in"
35 .Fa "const ASN1_OBJECT *val_in"
36 .Fa "unsigned char **der_out"
39 These functions decode and encode ASN.1 object identifiers.
40 For details about the semantics, examples, caveats, and bugs, see
43 The objects returned from
45 and the data contained in them are always marked as dynamically
46 allocated, so when they are no longer needed,
47 .Xr ASN1_OBJECT_free 3
48 can be called on them.
50 If reusing an existing object is attempted but the
52 passed in points to an object that is not marked as dynamically
53 allocated, then the existing object is left untouched and
59 A new object is allocated and a pointer to it is both stored in
71 returns the number of bytes successfully encoded
72 or a value <= 0 if an error occurs.
75 .Xr ASN1_OBJECT_new 3 ,
81 first appeared in SSLeay 0.5.1 and have been available since
85 never sets the long and short names of the object, not even if the
86 object identifier matches one that is built into the library.
87 To find the names of an object identifier parsed from DER or BER
90 on the returned object, and then
96 When reusing a dynamically allocated object that contains dynamically
97 allocated names, the old names are not freed and the memory containing