hu_SelfTestSbg56()

Performs power-up self-tests required by FIPS 140-2.

Synopsis:

#include "hugse56.h"
 
int hu_SelfTestSbg56(sb_GlobalCtx sbCtx)

Arguments:

sbCtx

A global context.

Library:

libhuapi (For the qcc command, use the -l huapi option to link against this library)

Description:

Power-up self-tests by FIPS 140-2 include software integrity test and known answer tests on FIPS Approved algorithms.

If the self-test fails for any reason, the state of the module will be set to SBG56_STATE_DISABLED.

The function may only be called if the module is in the SBG56_STATE_ENABLED state. Calling this function from any other state will result in an error being returned.

Returns:

SB_FAIL_LIBRARY_DISABLED

The self-tests could not be run because the module has been disabled.

SB_FAIL_LIBRARY_INTEGRITY

The integrity of the module was compromised. The module has been disabled.

SB_FAIL_KAT

The module failed one or more known-answer tests. The module has been disabled.

SB_FAIL_LIBRARY_NOT_INIT

The module has not been initialized.

SB_FAIL_LIBRARY_DISABLED

The module is disabled and this operation is not allowed.

SB_SUCCESS

Success.