s been freed.</p>

<h1 id="RETURN-VALUES">RETURN VALUES</h1>

<p>If the allocation fails, X509_new() returns NULL and sets an error code that can be obtained by <a href="../man3/ERR_get_error.html">ERR_get_error(3)</a>. Otherwise it returns a pointer to the newly allocated structure.</p>

<p>X509_up_ref() returns 1 for success and 0 for failure.</p>

<p>X509_chain_up_ref() returns a copy of the stack or NULL if an error occurred.</p>

<p>OSSL_STACK_OF_X509_free() has no return value.</p>

<h1 id="SEE-ALSO">