DH_generate_parameters

Generate Diffie-Hellman parameters with a legacy progress callback (deprecated).

Synopsis

Declared in <openssl/dh.h>

[[deprecated]]
DH*
DH_generate_parameters(
    int prime_len,
    int generator,
    void(* callback)(int, int, void*),
    void* cb_arg);

WARNING

Deprecated. Use of this entity is allowed but discouraged.

Return Value

Newly allocated DH with generated parameters, or NULL on failure.

Parameters

NameDescription
prime_lenDesired length of the prime p in bits.
generatorDH generator g (commonly 2 or 5).
callbackOptional progress callback (int, int, void *), or NULL.
cb_argOpaque pointer passed to callback.