libressl-d2i_DHparams(3)

libressl-d2i_DHparams3

Pkcs#3 dh parameter functions

Usage

Crypto Library (libcrypto, -lcrypto)

#include <openssl/dh.h>

DH *

d2i_DHparams(DH **a, unsigned char **pp, long length);

int

i2d_DHparams(DH *a, unsigned char **pp);

Overview

These functions decode and encode PKCS#3 DH parameters using the DHparameter structure described in PKCS#3. They otherwise behave in a way similar to d2i_X509(3) and i2d_X509(3).

Return values

d2i_DHparams() returns a DH object or NULL if an error occurs.

i2d_DHparams() returns the number of bytes successfully encoded or a value <= 0 if an error occurs.

History

d2i_DHparams() and i2d_DHparams() first appeared in SSLeay 0.5.1 and have been available since OpenBSD 2.4.

From libressl 4.4.0-1 in Arch Linux 2026-11-01. Parsed by carta from the page's mdoc source.