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