--- /dev/null
+/*
+ * Copyright 2023 The OpenSSL Project Authors. All Rights Reserved.
+ *
+ * Licensed under the Apache License 2.0 (the "License"). You may not use
+ * this file except in compliance with the License. You can obtain a copy
+ * in the file LICENSE in the source distribution or at
+ * https://www.openssl.org/source/license.html
+ */
+
+#ifdef FIPS_MODULE
+# include <openssl/types.h>
+
+int FIPS_security_check_enabled(OSSL_LIB_CTX *libctx);
+int FIPS_tls_prf_ems_check(OSSL_LIB_CTX *libctx);
+int FIPS_restricted_drbg_digests_enabled(OSSL_LIB_CTX *libctx);
+
+#endif
#include <openssl/core_names.h>
#include <openssl/obj_mac.h>
#include "prov/securitycheck.h"
-
-int FIPS_security_check_enabled(OSSL_LIB_CTX *libctx);
-int FIPS_tls_prf_ems_check(OSSL_LIB_CTX *libctx);
+#include "prov/fipscommon.h"
int ossl_securitycheck_enabled(OSSL_LIB_CTX *libctx)
{
#include "prov/providercommon.h"
#include "prov/provider_util.h"
#include "prov/seeding.h"
+#include "prov/fipscommon.h"
#include "internal/nelem.h"
#include "self_test.h"
#include "crypto/context.h"
}
#define FIPS_FEATURE_CHECK(fname, field) \
- int fname(OSSL_LIB_CTX *libctx); \
int fname(OSSL_LIB_CTX *libctx) \
{ \
FIPS_GLOBAL *fgbl = \
#include "crypto/rand_pool.h"
#include "prov/provider_ctx.h"
#include "prov/providercommon.h"
+#include "prov/fipscommon.h"
#include "crypto/context.h"
/*
"SHA3-256", "SHA3-512", /* non-truncated SHA3 allowed */
};
size_t i;
- extern int FIPS_restricted_drbg_digests_enabled(OSSL_LIB_CTX *libctx);
if (FIPS_restricted_drbg_digests_enabled(libctx)) {
for (i = 0; i < OSSL_NELEM(allowed_digests); i++)