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