goto exit;
}
- if (disable_fips_mode() < 0) {
- ret = -1;
- goto exit;
- }
-
if (tpmlib_register_callbacks(&cbs) != TPM_SUCCESS) {
ret = -1;
goto exit;
* Returns < 0 on error, 0 otherwise.
*/
#if defined(HAVE_OPENSSL_FIPS_H) || defined(HAVE_OPENSSL_FIPS_MODE_SET_API)
-int disable_fips_mode(void)
+int fips_mode_disable(void)
{
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
int mode = EVP_default_properties_is_fips_enabled(NULL);
}
#else
/* OpenBSD & DragonFlyBSD case */
-int disable_fips_mode(void)
+int fips_mode_disable(void)
{
return 0;
}
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef _SWTPM_UTILS_H_
-#define _SWTPM_UTILS_H_
+#ifndef _SWTPM_FIPS_H_
+#define _SWTPM_FIPS_H_
-int disable_fips_mode(void);
+int fips_mode_disable(void);
-#endif /* _SWTPM_UTILS_H_ */
+#endif /* _SWTPM_FIPS_H_ */
daemonize_finish();
}
- if (disable_fips_mode() < 0)
- goto error_seccomp_profile;
-
rc = mainLoop(&mlp, notify_fd[0]);
error_seccomp_profile:
daemonize_finish();
}
- if (disable_fips_mode() < 0)
- goto error_seccomp_profile;
-
rc = mainLoop(&mlp, notify_fd[0]);
error_seccomp_profile:
#include "utils.h"
#include "compiler_dependencies.h"
#include "swtpm_utils.h"
+#include "fips.h"
/*
* convert the blobtype integer into a string that libtpms
goto error_terminate;
}
}
+
+ if (fips_mode_disable() < 0)
+ goto error_terminate;
+
return TPM_SUCCESS;
error_terminate:
ssize_t read_eintr(int fd, void *buffer, size_t buflen);
-int disable_fips_mode(void);
-
#endif /* _SWTPM_UTILS_H_ */