FIPSCHECK(3)
π FIPSCHECK(3) β the fipscheck girlies' guide π
okay so this is the fipscheck.h page, bestie β it's the whole girl gang of functions you need when you're living that FIPS mode life. we're talking 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 β and yes, they're all in fipscheck.h. it's giving various functions relating to running in FIPS mode. slay. β¨
π SYNOPSIS π
like, literally just include the header and go:
#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);
no cap, that's the whole vibe check. π
π¦ DESCRIPTION π¦
okay so let's meet the cast, one icon at a time. π
FIPSCHECK_kernel_fips_mode()β this one tests for the FIPS-140-2 mode in kernel. that's it, that's the whole job. queen of knowing things. πFIPSCHECK_verify()β computes and compares the HMAC-SHA256 checksum by spawning thefipscheckcommand. yes bestie, it literally shells out. the parameterslibnameandsymbolnamedetermine which shared library file loaded into the process space will be checksummed. and here's the little plot twist: if these parameters are set toNULL, the executable of the calling process is the thing getting checksummed. main character energy fr. π₯FIPSCHECK_verify_ex()β same functionality as above, but with β¨optionsβ¨. it also lets you specify the fullhmac_suffix, with the default value of.hmac. and it will return success if the hmac file is missing and thefail_if_missingparameter is set to0. so generous. π«ΆFIPSCHECK_verify_files()β this one lets you explicitly specify aNULLterminated array of file names in the parameterfilesto check. you pick the squad, it checks the squad. πFIPSCHECK_verify_files_ex()β similarly, same functionality as above but also lets you specify the fullhmac_suffixwith the default value of.hmac. and it will return success if the first hmac file is missing and thefail_if_missingparameter is set to0. (yes, first. lowercase-keyword first. don't come for me, that's what it says.) πΈ
oh and the checksum file itself? it contains the HMAC-SHA256 encoded in hexadecimal notation using lowercase letters with one EOL character appended at the end. lowercase letters only, bestie β uppercase is not the vibe. π
FIPSCHECK_fips_module_installed()β returns1if the hmac checksum file is found and0otherwise. simple, iconic, no notes. βFIPSCHECK_get_library_path()andFIPSCHECK_get_binary_path()β these return the shared library and executable paths in thepath. the buffer pointed to by the parameter must be large enough to hold the path, otherwise the path is truncated (the audacity π). the size of the buffer is specified bypathlen.
π RETURN VALUE π
so here's the scoring system, iykyk: π
- the main functions
FIPSCHECK_verify()andFIPSCHECK_verify_files()return1when the verification of the binaries succeeds and0otherwise. FIPSCHECK_kernel_fips_mode()returns1when the kernel is in fips mode and0otherwise.- the auxiliary functions
FIPSCHECK_get_binary_path()andFIPSCHECK_get_library_path()return0on success and-1if the path cannot be determined.
so like, watch the polarity β the "yes it worked" answer flips between the two groups. it's giving trick question on the exam. π
π§ FIPS MODE π§
a kernel compiled with CONFIG_CRYPTO_FIPS=y can be booted in fips mode by specifying fips=1 as kernel parameter. that's the whole incantation. β¨
bestie, please refer to the security policy of the Kernel FIPS module for further details β i'm not making that up, it's literally what the page says. go read it. π
π SEE ALSO π
go click around, the repo is right there, no gatekeeping here. π
π AUTHOR π
- Tomas Mraz
<tmraz@redhat.com>β the legend himself. π₯ - man page authors: Paul Wouters
<pwouters@redhat.com>and Tomas Mraz<tmraz@redhat.com>β shoutout to the duo who wrote this out so we could all vibe. π«Ά
π COPYRIGHT π
Copyright 2008, 2012 Red Hat, Inc. All rights reserved.
so, redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met β and yes, we're quoting these properly because legal text is not a vibe to paraphrase: π
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- 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.
and that's the page, bestie! written by the fipscheck girlies and dated 16 April 2012 β vintage but still serving. mwah. π
πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: fipscheck-devel 1.7.0-160000.2.2 Β· BSD-2-Clause
- opensuse-leap 16.0: fipscheck-devel 1.7.0-160000.2.2 Β· BSD-2-Clause
- opensuse-leap 16.0: fipscheck-devel 1.7.0-160000.2.2 Β· BSD-2-Clause
- opensuse-leap 16.0: fipscheck-devel 1.7.0-160000.2.2 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms