FIPSCHECK_verify man page

FIPSCHECK_verify, FIPSCHECK_verify_ex, FIPSCHECK_verify_files, FIPSCHECK_verify_files_ex, FIPSCHECK_fips_module_installed, FIPSCHECK_get_binary_path, FIPSCHECK_get_library_path, FIPSCHECK_kernel_fips_mode, fipscheck.h — Various functions relating to running in FIPS mode

Synopsis

#include <fipscheck.h>

int FIPSCHECK_verify(const char *libname, const char *symbolname);

int FIPSCHECK_verify_ex(const char *libname, const char *symbolname, const char *hmac_suffix, int fail_if_missing);

int FIPSCHECK_verify_files(const char *files[]);

int FIPSCHECK_verify_files_ex(const char *hmac_suffix, int fail_if_missing, const char *files[]);

int FIPSCHECK_fips_module_installed(const char *libname, const char *symbolname, const char *hmac_suffix);

int FIPSCHECK_get_binary_path(char *path, size_t pathlen);

int FIPSCHECK_get_library_path(const char *libname, const char *symbolname, char *path, size_t pathlen);

int FIPSCHECK_kernel_fips_mode(void);

Description

The function FIPSCHECK_kernel_fips_mode() tests for the FIPS-140-2 mode in kernel.

The function FIPSCHECK_verify() computes and compares HMAC-SHA256 checksum by spawning the fipscheck command. The parameters libname and symbolname determine which shared library file loaded into the process space will be checksummed. If these parameters are set to NULL, the executable of the calling process is checksummed.

The function FIPSCHECK_verify_ex() in addition to the functionality above also allows to specify the full hmac_suffix with the default value of .hmac. And will return success if the hmac file is missing and the fail_if_missing parameter is set to 0.

The function FIPSCHECK_verify_files() can be used to explicitly specify NULL terminated array of file names in the parameter files to check.

Similarly the function FIPSCHECK_verify_files_ex() in addition to the functionality above also allows to specify the full hmac_suffix with the default value of .hmac. And will return success if the first hmac file is missing and the fail_if_missing parameter is set to 0.

The checksum file contains the HMAC-SHA256 encoded in hexadecimal notation using lowercase letters with one EOL character appended at the end.

The function FIPSCHECK_fips_module_installed() returns 1 if the hmac checksum file is found and 0 otherwise.

The functions FIPSCHECK_get_library_path() and FIPSCHECK_get_binary_path() return the shared library and executable paths in the path. The buffer pointed to by the parameter must be large enough to hold the path otherwise the path is truncated. The size of the buffer is specified by the pathlen.

Return Value

The main functions FIPSCHECK_verify() and FIPSCHECK_verify_files() return 1 when the verification of the binaries succeeds and 0 otherwise. The function FIPSCHECK_kernel_fips_mode() returns 1 when the kernel is in fips mode and 0 otherwise.

The auxiliary functions FIPSCHECK_get_binary_path() and FIPSCHECK_get_library_path() return 0 on success and -1 if the path cannot be determined.

Fips Mode

A kernel compiled with CONFIG_CRYPTO_FIPS=y can be booted in fips mode by specifying fips=1 as kernel parameter. Please refer to the security policy of the Kernel FIPS module for further details.

See Also

fipscheck(8), fipshmac(8), https://fedorahosted.org/fipscheck/

Author

Tomas Mraz <tmraz@redhat.com>.

Man page authors Paul Wouters <pwouters@redhat.com> and Tomas Mraz <tmraz@redhat.com>.

Referenced By

fipscheck(8), fipshmac(8).

FIPSCHECK_fips_module_installed(3), FIPSCHECK_get_binary_path(3), FIPSCHECK_get_library_path(3), fipscheck.h(3), FIPSCHECK_kernel_fips_mode(3), FIPSCHECK_verify_ex(3), FIPSCHECK_verify_files(3) and FIPSCHECK_verify_files_ex(3) are aliases of FIPSCHECK_verify(3).

16 April 2012 fipscheck fipscheck