blob: 46b1570765ad64c8a9d972d73a6ed12e268310a8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
.Dd $Mdocdate: November 2 2016 $
.Dt DH_NEW 3
.Os
.Sh NAME
.Nm DH_new ,
.Nm DH_free
.Nd allocate and free DH objects
.Sh SYNOPSIS
.In openssl/dh.h
.Ft DH*
.Fn DH_new void
.Ft void
.Fo DH_free
.Fa "DH *dh"
.Fc
.Sh DESCRIPTION
.Fn DH_new
allocates and initializes a
.Vt DH
structure.
.Pp
.Fn DH_free
frees the
.Vt DH
structure and its components.
The values are erased before the memory is returned to the system.
.Sh RETURN VALUES
If the allocation fails,
.Fn DH_new
returns
.Dv NULL
and sets an error code that can be obtained by
.Xr ERR_get_error 3 .
Otherwise it returns a pointer to the newly allocated structure.
.Sh SEE ALSO
.Xr dh 3 ,
.Xr DH_generate_key 3 ,
.Xr DH_generate_parameters 3 ,
.Xr ERR_get_error 3
.Sh HISTORY
.Fn DH_new
and
.Fn DH_free
are available in all versions of SSLeay and OpenSSL.
|