summaryrefslogtreecommitdiff
path: root/doc/man3/X509_new.pod
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2020-12-23 19:33:03 +0100
committerDr. David von Oheimb <dev@ddvo.net>2021-02-04 07:28:11 +0100
commitd53b437f9992f974c1623e9b9b9bdf053aefbcc3 (patch)
tree12b15a5d0a6e885be5e9118c5b4542c6234039f0 /doc/man3/X509_new.pod
parentb91a13f429570512bfee290e8ec50096b0667e45 (diff)
downloadopenssl-new-d53b437f9992f974c1623e9b9b9bdf053aefbcc3.tar.gz
Allow NULL arg to OPENSSL_sk_{dup,deep_copy} returning empty stack
This simplifies many usages Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14040)
Diffstat (limited to 'doc/man3/X509_new.pod')
-rw-r--r--doc/man3/X509_new.pod13
1 files changed, 6 insertions, 7 deletions
diff --git a/doc/man3/X509_new.pod b/doc/man3/X509_new.pod
index b40715bddf..ab310bff57 100644
--- a/doc/man3/X509_new.pod
+++ b/doc/man3/X509_new.pod
@@ -2,9 +2,9 @@
=head1 NAME
-X509_chain_up_ref,
X509_new, X509_new_ex,
-X509_free, X509_up_ref - X509 certificate ASN1 allocation functions
+X509_free, X509_up_ref,
+X509_chain_up_ref - X509 certificate ASN1 allocation functions
=head1 SYNOPSIS
@@ -37,7 +37,7 @@ frees it up if the reference count is zero. If B<a> is NULL nothing is done.
X509_up_ref() increments the reference count of B<a>.
X509_chain_up_ref() increases the reference count of all certificates in
-chain B<x> and returns a copy of the stack.
+chain B<x> and returns a copy of the stack, or an empty stack if B<a> is NULL.
=head1 NOTES
@@ -46,20 +46,19 @@ used by several different operations each of which will free it up after
use: this avoids the need to duplicate the entire certificate structure.
The function X509_chain_up_ref() doesn't just up the reference count of
-each certificate it also returns a copy of the stack, using sk_X509_dup(),
+each certificate. It also returns a copy of the stack, using sk_X509_dup(),
but it serves a similar purpose: the returned chain persists after the
original has been freed.
=head1 RETURN VALUES
-If the allocation fails, X509_new() returns B<NULL> and sets an error
+If the allocation fails, X509_new() returns NULL and sets an error
code that can be obtained by L<ERR_get_error(3)>.
Otherwise it returns a pointer to the newly allocated structure.
X509_up_ref() returns 1 for success and 0 for failure.
-X509_chain_up_ref() returns a copy of the stack or B<NULL> if an error
-occurred.
+X509_chain_up_ref() returns a copy of the stack or NULL if an error occurred.
=head1 SEE ALSO