1*e71b7053SJung-uk Kim=pod 2*e71b7053SJung-uk Kim 3*e71b7053SJung-uk Kim=head1 NAME 4*e71b7053SJung-uk Kim 5*e71b7053SJung-uk KimASN1_OBJECT_new, ASN1_OBJECT_free - object allocation functions 6*e71b7053SJung-uk Kim 7*e71b7053SJung-uk Kim=head1 SYNOPSIS 8*e71b7053SJung-uk Kim 9*e71b7053SJung-uk Kim #include <openssl/asn1.h> 10*e71b7053SJung-uk Kim 11*e71b7053SJung-uk Kim ASN1_OBJECT *ASN1_OBJECT_new(void); 12*e71b7053SJung-uk Kim void ASN1_OBJECT_free(ASN1_OBJECT *a); 13*e71b7053SJung-uk Kim 14*e71b7053SJung-uk Kim=head1 DESCRIPTION 15*e71b7053SJung-uk Kim 16*e71b7053SJung-uk KimThe ASN1_OBJECT allocation routines, allocate and free an 17*e71b7053SJung-uk KimASN1_OBJECT structure, which represents an ASN1 OBJECT IDENTIFIER. 18*e71b7053SJung-uk Kim 19*e71b7053SJung-uk KimASN1_OBJECT_new() allocates and initializes an ASN1_OBJECT structure. 20*e71b7053SJung-uk Kim 21*e71b7053SJung-uk KimASN1_OBJECT_free() frees up the B<ASN1_OBJECT> structure B<a>. 22*e71b7053SJung-uk KimIf B<a> is NULL, nothing is done. 23*e71b7053SJung-uk Kim 24*e71b7053SJung-uk Kim=head1 NOTES 25*e71b7053SJung-uk Kim 26*e71b7053SJung-uk KimAlthough ASN1_OBJECT_new() allocates a new ASN1_OBJECT structure it 27*e71b7053SJung-uk Kimis almost never used in applications. The ASN1 object utility functions 28*e71b7053SJung-uk Kimsuch as OBJ_nid2obj() are used instead. 29*e71b7053SJung-uk Kim 30*e71b7053SJung-uk Kim=head1 RETURN VALUES 31*e71b7053SJung-uk Kim 32*e71b7053SJung-uk KimIf the allocation fails, ASN1_OBJECT_new() returns B<NULL> and sets an error 33*e71b7053SJung-uk Kimcode that can be obtained by L<ERR_get_error(3)>. 34*e71b7053SJung-uk KimOtherwise it returns a pointer to the newly allocated structure. 35*e71b7053SJung-uk Kim 36*e71b7053SJung-uk KimASN1_OBJECT_free() returns no value. 37*e71b7053SJung-uk Kim 38*e71b7053SJung-uk Kim=head1 SEE ALSO 39*e71b7053SJung-uk Kim 40*e71b7053SJung-uk KimL<ERR_get_error(3)>, L<d2i_ASN1_OBJECT(3)> 41*e71b7053SJung-uk Kim 42*e71b7053SJung-uk Kim=head1 COPYRIGHT 43*e71b7053SJung-uk Kim 44*e71b7053SJung-uk KimCopyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved. 45*e71b7053SJung-uk Kim 46*e71b7053SJung-uk KimLicensed under the OpenSSL license (the "License"). You may not use 47*e71b7053SJung-uk Kimthis file except in compliance with the License. You can obtain a copy 48*e71b7053SJung-uk Kimin the file LICENSE in the source distribution or at 49*e71b7053SJung-uk KimL<https://www.openssl.org/source/license.html>. 50*e71b7053SJung-uk Kim 51*e71b7053SJung-uk Kim=cut 52