diff options
Diffstat (limited to 'src/lib/libcrypto/man/DH_new.3')
| -rw-r--r-- | src/lib/libcrypto/man/DH_new.3 | 29 |
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 |
| 70 | allocates and initializes a | 75 | allocates and initializes a |
| 71 | .Vt DH | 76 | .Vt DH |
| 72 | structure. | 77 | structure, setting the reference count to 1. |
| 78 | It is equivalent to | ||
| 79 | .Xr DH_new_method 3 | ||
| 80 | with a | ||
| 81 | .Dv NULL | ||
| 82 | argument. | ||
| 83 | .Pp | ||
| 84 | .Fn DH_up_ref | ||
| 85 | increments the reference count by 1. | ||
| 73 | .Pp | 86 | .Pp |
| 74 | .Fn DH_free | 87 | .Fn DH_free |
| 75 | frees the | 88 | decrements the reference count by 1. |
| 89 | If it reaches 0, it frees the | ||
| 76 | .Vt DH | 90 | .Vt DH |
| 77 | structure and its components. | 91 | structure and its components. |
| 78 | The values are erased before the memory is returned to the system. | 92 | The values are erased before the memory is returned to the system. |
| @@ -89,6 +103,9 @@ returns | |||
| 89 | and sets an error code that can be obtained by | 103 | and sets an error code that can be obtained by |
| 90 | .Xr ERR_get_error 3 . | 104 | .Xr ERR_get_error 3 . |
| 91 | Otherwise it returns a pointer to the newly allocated structure. | 105 | Otherwise it returns a pointer to the newly allocated structure. |
| 106 | .Pp | ||
| 107 | .Fn DH_up_ref | ||
| 108 | returns 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 |
| 109 | first appeared in SSLeay 0.5.1 and have been available since | 126 | first 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 | ||
| 130 | first appeared in OpenSSL 0.9.7 and has been available since | ||
| 131 | .Ox 3.2 . | ||
