fips_self_test

Function fips_self_test 

Source
pub fn fips_self_test() -> FipsAttestation
Expand description

Run the FIPS startup self-test.

When FIPS mode is enabled (Enterprise), this verifies that the process-default rustls crypto provider is the aws-lc-rs FIPS provider and returns a FipsAttestation with the provider name, version, self-test result, and timestamp. The self-test SUCCEEDS when:

  1. A process-default crypto provider is installed.
  2. The installed provider’s name matches FIPS_PROVIDER_NAME.

When FIPS mode is disabled (OSS builds), this returns FipsAttestation::disabled (inert, no provider check).

The caller (dwara-bin) installs the provider BEFORE calling this, so the test verifies the install took effect. The function is idempotent and safe to call from tests (the provider is process-global).