Function s2n_tls_sys::s2n_config_set_wall_clock

source ·
pub unsafe extern "C" fn s2n_config_set_wall_clock(
    config: *mut s2n_config,
    clock_fn: s2n_clock_time_nanoseconds,
    ctx: *mut c_void
) -> c_int
Expand description

Allows the caller to set a callback function that will be used to get the system time. The time returned should be the number of nanoseconds since the Unix epoch (Midnight, January 1st, 1970).

s2n-tls uses this clock for timestamps.

@param config The configuration object being updated @param clock_fn The wall clock time callback function @param ctx An opaque pointer that the callback will be invoked with @returns S2N_SUCCESS on success. S2N_FAILURE on failure