]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
doc: add documentation for the X509_PUBKEY_dup() function
authorPauli <pauli@openssl.org>
Thu, 25 Mar 2021 01:55:06 +0000 (11:55 +1000)
committerPauli <pauli@openssl.org>
Sun, 28 Mar 2021 06:34:34 +0000 (16:34 +1000)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14642)

doc/man3/X509_PUBKEY_new.pod

index fa6141d682e7592ac20316f2096c5317df197f91..72d399f64743494140bbe74efc09b0b5569e67f1 100644 (file)
@@ -46,6 +46,9 @@ structure defined in RFC5280 and used in certificates and certificate requests.
 
 X509_PUBKEY_new() allocates and initializes an B<X509_PUBKEY> structure.
 
+X509_PUBKEY_dup() creates a duplicate copy of the B<X509_PUBKEY> object
+specified by I<a>.
+
 X509_PUBKEY_free() frees up B<X509_PUBKEY> structure B<a>. If B<a> is NULL
 nothing is done.
 
@@ -102,10 +105,9 @@ directly: they will instead call wrapper functions such as X509_get0_pubkey().
 
 =head1 RETURN VALUES
 
-If the allocation fails, X509_PUBKEY_new() returns B<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.
+If the allocation fails, X509_PUBKEY_new() and X509_PUBKEY_dup() return
+B<NULL> and set an error code that can be obtained by L<ERR_get_error(3)>.
+Otherwise they return a pointer to the newly allocated structure.
 
 X509_PUBKEY_free() does not return a value.