DH_NEW(3ossl)
β¨ DH_NEW π
okay bestie, welcome to the manual page for DH_new(3ossl) β yes that's the OpenSSL one, and yes we're doing this π
πΈ NAME πΈ
DH_new, DH_free β the lil duo that allocates and frees DH objects π¦
π SYNOPSIS π
#include <openssl/dh.h>
okay so first things first, heads up: the following functions have been deprecated since OpenSSL 3.0, and you can hide them entirely by defining OPENSSL_API_COMPAT with a suitable version value β peep openssl_user_macros(7) for the deets π
DH* DH_new(void);
void DH_free(DH *dh);
π DESCRIPTION π
DH_new()β allocates and initializes aDHstructure. that's it, that's the whole vibe β¨DH_free()β frees theDHstructure and its components. and no cap, the values get erased before the memory is handed back to the system π§Ή (clean girl behaviour fr fr). oh and ifdhisNULL, literally nothing happens β it just doesn't do the thing π
π«Ά RETURN VALUES π«Ά
if the allocation fails, DH_new() returns NULL and sets an error code that you can grab with ERR_get_error(3). otherwise it hands you back a pointer to the newly allocated structure, slay π
DH_free() returns no value. it's giving silent but deadly (in a good way) π
π SEE ALSO π
β HISTORY β
all of these functions were deprecated in OpenSSL 3.0 π
for the replacement, go look at EVP_PKEY-DH(7) β that's your main character now π
π COPYRIGHT π
Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
okay that's the whole page bestie, mwah π this was OpenSSL version 3.5.9, dated 2026-09-29, and the manual name is DH_NEW(3ossl) in case you forgot already π bye bye, go read EVP_PKEY-DH(7) π¦π
π¦ where this page comes from
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms