Sortix
Sortix Download Manual Development Source Code News Blog More
current nightly

Sortix nightly manual

This manual documents Sortix nightly, a development build that has not been officially released. You can instead view this document in the latest official manual.

NAME

d2i_DHparams, i2d_DHparams — PKCS#3 DH parameter functions

SYNOPSIS

#include <openssl/dh.h>
DH *
d2i_DHparams(DH **a, unsigned char **pp, long length);
int
i2d_DHparams(DH *a, unsigned char **pp);

DESCRIPTION

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.

SEE ALSO

d2i_X509(3), DH_new(3)

HISTORY

d2i_DHparams() and i2d_DHparams() first appeared in SSLeay 0.5.1 and have been available since OpenBSD 2.4.
Copyright 2011-2025 Jonas 'Sortie' Termansen and contributors.
Sortix's source code is free software under the ISC license.
#sortix on irc.sortix.org
@sortix_org