
#use wml::openssl-macros area=docs page=ASN1_OBJECT_new

<title>Documents, ASN1_OBJECT_new(3)</title>

<h1>ASN1_OBJECT_new(3)</h1>

#use wml::imp::generic

{:
## What's this? [[s|(<STRONG>[^<].+?)</A>(</STRONG><DD>)|$1$2|sg]]
[[s|<P>\s+<P>|<P>|sg]]
[[s|<P>\s+</|</|sg]]
[[s|<DD>\s*<DT>|<DD>&nbsp;<DT>|sg]]
[[s|<DD>\s*</DL>|<DD>&nbsp;</DL>|sg]]
[[s|\[|&#91;|sg]]
[[s|\]|&#93;|sg]]

<!-- INDEX BEGIN -->

<UL>

	<LI><A HREF="#NAME">NAME</A>
	<LI><A HREF="#SYNOPSIS">SYNOPSIS</A>
	<LI><A HREF="#DESCRIPTION">DESCRIPTION</A>
	<LI><A HREF="#NOTES">NOTES</A>
	<LI><A HREF="#RETURN_VALUES">RETURN VALUES</A>
	<LI><A HREF="#SEE_ALSO">SEE ALSO</A>
	<LI><A HREF="#HISTORY">HISTORY</A>
</UL>
<!-- INDEX END -->

<HR>
<P>
<HR>
<H1><A NAME="NAME">NAME</A></H1>
<P>
ASN1_OBJECT_new, ASN1_OBJECT_free, - object allocation functions

</P>
<P>
<HR>
<H1><A NAME="SYNOPSIS">SYNOPSIS</A></H1>
<PRE> #include &lt;openssl/asn1.h&gt;
</PRE>
<PRE> ASN1_OBJECT *ASN1_OBJECT_new(void);
 void ASN1_OBJECT_free(ASN1_OBJECT *a);
</PRE>
<P>
<HR>
<H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1>
<P>
The ASN1_OBJECT allocation routines, allocate and free an ASN1_OBJECT
structure, which represents an ASN1 OBJECT IDENTIFIER.

</P>
<P>
<CODE>ASN1_OBJECT_new()</CODE> allocates and initializes a ASN1_OBJECT
structure.

</P>
<P>
<CODE>ASN1_OBJECT_free()</CODE> frees up the <STRONG>ASN1_OBJECT</STRONG> structure <STRONG>a</STRONG>.

</P>
<P>
<HR>
<H1><A NAME="NOTES">NOTES</A></H1>
<P>
Although <CODE>ASN1_OBJECT_new()</CODE> allocates a new ASN1_OBJECT
structure it is almost never used in applications. The ASN1 object utility
functions such as <CODE>OBJ_nid2obj()</CODE> are used instead.

</P>
<P>
<HR>
<H1><A NAME="RETURN_VALUES">RETURN VALUES</A></H1>
<P>
If the allocation fails, <CODE>ASN1_OBJECT_new()</CODE> returns <STRONG>NULL</STRONG> and sets an error code that can be obtained by <A HREF="../crypto/ERR_get_error.html#">ERR_get_error(3)</A>. Otherwise it returns a pointer to the newly allocated structure.

</P>
<P>
<CODE>ASN1_OBJECT_free()</CODE> returns no value.

</P>
<P>
<HR>
<H1><A NAME="SEE_ALSO">SEE ALSO</A></H1>
<P>
<A HREF="../crypto/ERR_get_error.html#">ERR_get_error(3)</A>, <A HREF="../crypto/d2i_ASN1_OBJECT.html#">d2i_ASN1_OBJECT(3)</A>



</P>
<P>
<HR>
<H1><A NAME="HISTORY">HISTORY</A></H1>
<P>
<CODE>ASN1_OBJECT_new()</CODE> and <CODE>ASN1_OBJECT_free()</CODE> are
available in all versions of SSLeay and OpenSSL.

</P>
:}


