FIPSCHECK_verify (3) - Linux Man Pages
FIPSCHECK_verify: Various functions relating to running in FIPS mode
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
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
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);
*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);
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.
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.
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.
Tomas Mraz <tmraz [at] redhat.com>.
Man page authors Paul Wouters <pwouters [at] redhat.com> and Tomas Mraz <tmraz [at] redhat.com>.
Copyright 2008, 2012 Red Hat, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
fipscheck(8), fipshmac(8), m[blue]https://fedorahosted.org/fipscheck/m