BN_GENCB_set

Populate a BN_GENCB with a new-style progress callback that returns success/failure.

Synopsis

Declared in <openssl/bn.h>

void
BN_GENCB_set(
    BN_GENCB* gencb,
    int(* callback)(int, int, BN_GENCB*),
    void* cb_arg);

Parameters

NameDescription
gencbCallback object from BN_GENCB_new() (or a stack instance where supported).
callbackCallback receiving (event, progress, gencb); should return 1 on success or 0 on error.
cb_argOpaque pointer stored in gencb and retrievable via BN_GENCB_get_arg().