summaryrefslogtreecommitdiffstats
path: root/providers
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2020-09-07 11:58:48 +1000
committerPauli <paul.dale@oracle.com>2020-09-12 16:46:20 +1000
commit6cf37302677a87539fd017e3466813510ce51023 (patch)
tree144556143a1a4ce6654b296b23c4840a4e9892d6 /providers
parenteab7b4240dc87e27d8b12b5af23d3cf20dd06f55 (diff)
FIPS: rename the status call to is_running.
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/12801)
Diffstat (limited to 'providers')
-rw-r--r--providers/fips/fipsprov.c6
-rw-r--r--providers/fips/self_test.c4
-rw-r--r--providers/fips/self_test.h1
3 files changed, 6 insertions, 5 deletions
diff --git a/providers/fips/fipsprov.c b/providers/fips/fipsprov.c
index c9867f998c..0f1c979efe 100644
--- a/providers/fips/fipsprov.c
+++ b/providers/fips/fipsprov.c
@@ -99,7 +99,7 @@ static const OSSL_PARAM fips_param_types[] = {
OSSL_PARAM_DEFN(OSSL_PROV_PARAM_NAME, OSSL_PARAM_UTF8_PTR, NULL, 0),
OSSL_PARAM_DEFN(OSSL_PROV_PARAM_VERSION, OSSL_PARAM_UTF8_PTR, NULL, 0),
OSSL_PARAM_DEFN(OSSL_PROV_PARAM_BUILDINFO, OSSL_PARAM_UTF8_PTR, NULL, 0),
- OSSL_PARAM_DEFN(OSSL_PROV_PARAM_STATUS, OSSL_PARAM_UNSIGNED_INTEGER, NULL, 0),
+ OSSL_PARAM_DEFN(OSSL_PROV_PARAM_STATUS, OSSL_PARAM_INTEGER, NULL, 0),
OSSL_PARAM_END
};
@@ -148,7 +148,7 @@ static int fips_get_params(void *provctx, OSSL_PARAM params[])
if (p != NULL && !OSSL_PARAM_set_utf8_ptr(p, OPENSSL_FULL_VERSION_STR))
return 0;
p = OSSL_PARAM_locate(params, OSSL_PROV_PARAM_STATUS);
- if (p != NULL && !OSSL_PARAM_set_uint(p, FIPS_is_running()))
+ if (p != NULL && !OSSL_PARAM_set_int(p, ossl_prov_is_running()))
return 0;
return 1;
}
@@ -480,7 +480,7 @@ static const OSSL_ALGORITHM *fips_query(void *provctx, int operation_id,
{
*no_cache = 0;
- if (!FIPS_is_running())
+ if (!ossl_prov_is_running())
return NULL;
switch (operation_id) {
diff --git a/providers/fips/self_test.c b/providers/fips/self_test.c
index 978440adf1..8a70bdee7c 100644
--- a/providers/fips/self_test.c
+++ b/providers/fips/self_test.c
@@ -15,6 +15,8 @@
#include <openssl/err.h>
#include "e_os.h"
#include "prov/providercommonerr.h"
+#include "prov/providercommon.h"
+
/*
* We're cheating here. Normally we don't allow RUN_ONCE usage inside the FIPS
* module because all such initialisation should be associated with an
@@ -307,7 +309,7 @@ end:
}
-unsigned int FIPS_is_running(void)
+int ossl_prov_is_running(void)
{
return FIPS_state == FIPS_STATE_RUNNING
|| FIPS_state == FIPS_STATE_SELFTEST;
diff --git a/providers/fips/self_test.h b/providers/fips/self_test.h
index f40788581c..20f8a12472 100644
--- a/providers/fips/self_test.h
+++ b/providers/fips/self_test.h
@@ -34,4 +34,3 @@ typedef struct self_test_post_params_st {
int SELF_TEST_post(SELF_TEST_POST_PARAMS *st, int on_demand_test);
int SELF_TEST_kats(OSSL_SELF_TEST *event, OPENSSL_CTX *libctx);
-unsigned int FIPS_is_running(void);