summaryrefslogtreecommitdiff
path: root/lib/libcrypto/man/ASN1_OBJECT_new.3
blob: 526e1d869bf692d8801647da542447b58e884f8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.Dd $Mdocdate: March 12 2016 $
.Dt ASN1_OBJECT_NEW 3
.Os
.Sh NAME
.Nm ASN1_OBJECT_new ,
.Nm ASN1_OBJECT_free
.Nd ASN1 object allocation functions
.Sh SYNOPSIS
.In openssl/asn1.h
.Ft ASN1_OBJECT *
.Fo ASN1_OBJECT_new
.Fa void
.Fc
.Ft void
.Fo ASN1_OBJECT_free
.Fa "ASN1_OBJECT *a"
.Fc
.Sh DESCRIPTION
The ASN1_OBJECT allocation routines allocate and free an
.Vt ASN1_OBJECT
structure, which represents an ASN1 OBJECT IDENTIFIER.
.Pp
.Fn ASN1_OBJECT_new
allocates and initializes an
.Vt ASN1_OBJECT
structure.
.Pp
.Fn ASN1_OBJECT_free
frees up the
.Vt ASN1_OBJECT
structure
.Fa a .
.Sh NOTES
Although
.Fn ASN1_OBJECT_new
allocates a new
.Vt ASN1_OBJECT
structure, it is almost never used in applications.
The ASN1 object utility functions such as
.Xr OBJ_nid2obj 3
are used instead.
.Sh RETURN VALUES
If the allocation fails,
.Fn ASN1_OBJECT_new
returns
.Dv NULL
and sets an error code that can be obtained by
.Xr ERR_get_error 3 .
Otherwise it returns a pointer to the newly allocated structure.
.Sh SEE ALSO
.Xr d2i_ASN1_OBJECT 3 ,
.Xr ERR_get_error 3 ,
.Xr OBJ_nid2obj 3
.Sh HISTORY
.Fn ASN1_OBJECT_new
and
.Fn ASN1_OBJECT_free
are available in all versions of SSLeay and OpenSSL.