summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/DH_new.3
diff options
context:
space:
mode:
authorschwarze <>2018-04-18 01:11:45 +0000
committerschwarze <>2018-04-18 01:11:45 +0000
commita4c05ae36d82b4519f2776b36a8f194f93de8968 (patch)
tree7b0061152e4002b12206265090ac4b5906038ae8 /src/lib/libcrypto/man/DH_new.3
parentbf38af2d204a66db252db88697e129c75810d022 (diff)
downloadopenbsd-a4c05ae36d82b4519f2776b36a8f194f93de8968.tar.gz
openbsd-a4c05ae36d82b4519f2776b36a8f194f93de8968.tar.bz2
openbsd-a4c05ae36d82b4519f2776b36a8f194f93de8968.zip
* Document DH_up_ref(3), DSA_up_ref(3), and RSA_up_ref(3).
* Correct documentation of DH_new(3), DH_free(3), DSA_new(3), DSA_free(3), RSA_new(3), and RSA_free(3) with respect to reference counting. * Stop referencing engine(3).
Diffstat (limited to 'src/lib/libcrypto/man/DH_new.3')
-rw-r--r--src/lib/libcrypto/man/DH_new.329
1 files changed, 25 insertions, 4 deletions
diff --git a/src/lib/libcrypto/man/DH_new.3 b/src/lib/libcrypto/man/DH_new.3
index bd3b310561..3208e76701 100644
--- a/src/lib/libcrypto/man/DH_new.3
+++ b/src/lib/libcrypto/man/DH_new.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: DH_new.3,v 1.7 2018/03/27 17:35:50 schwarze Exp $ 1.\" $OpenBSD: DH_new.3,v 1.8 2018/04/18 01:11:45 schwarze Exp $
2.\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 2.\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
3.\" 3.\"
4.\" This file was written by Ulf Moeller <ulf@openssl.org>. 4.\" This file was written by Ulf Moeller <ulf@openssl.org>.
@@ -48,17 +48,22 @@
48.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 48.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
49.\" OF THE POSSIBILITY OF SUCH DAMAGE. 49.\" OF THE POSSIBILITY OF SUCH DAMAGE.
50.\" 50.\"
51.Dd $Mdocdate: March 27 2018 $ 51.Dd $Mdocdate: April 18 2018 $
52.Dt DH_NEW 3 52.Dt DH_NEW 3
53.Os 53.Os
54.Sh NAME 54.Sh NAME
55.Nm DH_new , 55.Nm DH_new ,
56.Nm DH_up_ref ,
56.Nm DH_free 57.Nm DH_free
57.Nd allocate and free DH objects 58.Nd allocate and free DH objects
58.Sh SYNOPSIS 59.Sh SYNOPSIS
59.In openssl/dh.h 60.In openssl/dh.h
60.Ft DH* 61.Ft DH*
61.Fn DH_new void 62.Fn DH_new void
63.Ft int
64.Fo DH_up_ref
65.Fa "DH *dh"
66.Fc
62.Ft void 67.Ft void
63.Fo DH_free 68.Fo DH_free
64.Fa "DH *dh" 69.Fa "DH *dh"
@@ -69,10 +74,19 @@ The DH functions implement the Diffie-Hellman key agreement protocol.
69.Fn DH_new 74.Fn DH_new
70allocates and initializes a 75allocates and initializes a
71.Vt DH 76.Vt DH
72structure. 77structure, setting the reference count to 1.
78It is equivalent to
79.Xr DH_new_method 3
80with a
81.Dv NULL
82argument.
83.Pp
84.Fn DH_up_ref
85increments the reference count by 1.
73.Pp 86.Pp
74.Fn DH_free 87.Fn DH_free
75frees the 88decrements the reference count by 1.
89If it reaches 0, it frees the
76.Vt DH 90.Vt DH
77structure and its components. 91structure and its components.
78The values are erased before the memory is returned to the system. 92The values are erased before the memory is returned to the system.
@@ -89,6 +103,9 @@ returns
89and sets an error code that can be obtained by 103and sets an error code that can be obtained by
90.Xr ERR_get_error 3 . 104.Xr ERR_get_error 3 .
91Otherwise it returns a pointer to the newly allocated structure. 105Otherwise it returns a pointer to the newly allocated structure.
106.Pp
107.Fn DH_up_ref
108returns 1 for success or 0 for failure.
92.Sh SEE ALSO 109.Sh SEE ALSO
93.Xr BN_new 3 , 110.Xr BN_new 3 ,
94.Xr d2i_DHparams 3 , 111.Xr d2i_DHparams 3 ,
@@ -108,3 +125,7 @@ and
108.Fn DH_free 125.Fn DH_free
109first appeared in SSLeay 0.5.1 and have been available since 126first appeared in SSLeay 0.5.1 and have been available since
110.Ox 2.4 . 127.Ox 2.4 .
128.Pp
129.Fn DH_up_ref
130first appeared in OpenSSL 0.9.7 and has been available since
131.Ox 3.2 .