Function s2n_quic::provider::tls::default::ffi::s2n_get_fips_mode

source ·
pub unsafe extern "C" fn s2n_get_fips_mode(fips_mode: *mut u32) -> i32
Expand description

Determines whether s2n-tls is operating in FIPS mode.

s2n-tls enters FIPS mode on initialization when the linked libcrypto has FIPS mode enabled. Some libcryptos, such as AWS-LC-FIPS, have FIPS mode enabled by default. With other libcryptos, such as OpenSSL, FIPS mode must be enabled before initialization by calling FIPS_mode_set().

s2n-tls MUST be linked to a FIPS libcrypto and MUST be in FIPS mode in order to comply with FIPS requirements. Applications desiring FIPS compliance should use this API to ensure that s2n-tls has been properly linked with a FIPS libcrypto and has successfully entered FIPS mode.

@param fips_mode Set to the FIPS mode of s2n-tls. @returns S2N_SUCCESS on success. S2N_FAILURE on failure.