X509_new, X509_new_ex,
X509_free, X509_up_ref,
-X509_chain_up_ref - X509 certificate ASN1 allocation functions
+X509_chain_up_ref,
+OSSL_STACK_OF_X509_free
+- X509 certificate ASN1 allocation and deallocation functions
=head1 SYNOPSIS
void X509_free(X509 *a);
int X509_up_ref(X509 *a);
STACK_OF(X509) *X509_chain_up_ref(STACK_OF(X509) *x);
+ void OSSL_STACK_OF_X509_free(STACK_OF(X509) *certs);
=head1 DESCRIPTION
X509_chain_up_ref() increases the reference count of all certificates in
chain B<x> and returns a copy of the stack, or an empty stack if B<a> is NULL.
+OSSL_STACK_OF_X509_free() deallocates the given list of pointers to
+certificates after calling X509_free() on all its elements.
+
=head1 NOTES
The function X509_up_ref() if useful if a certificate structure is being
X509_chain_up_ref() returns a copy of the stack or NULL if an error occurred.
+OSSL_STACK_OF_X509_free() has no return value.
+
=head1 SEE ALSO
L<d2i_X509(3)>,
=head1 HISTORY
-The function X509_new_ex() was added in OpenSSL 3.0.
+X509_new_ex() was added in OpenSSL 3.0.
+
+OSSL_STACK_OF_X509_free() was added in OpenSSL 3.1.
=head1 COPYRIGHT