summaryrefslogtreecommitdiffstats
path: root/providers/fips
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2020-09-28 12:47:04 +1000
committerPauli <paul.dale@oracle.com>2020-09-29 16:33:16 +1000
commit7d6766cb537e5cebc99e200bc537f744878a87a4 (patch)
treedb9fbd45925e6735deb25b4b1a44771a107c003e /providers/fips
parent1be63951f87dfcbc98efe5d94a15298fea885890 (diff)
prov: prefix provider internal functions with ossl_
Also convert the names to lower case. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13014)
Diffstat (limited to 'providers/fips')
-rw-r--r--providers/fips/fipsprov.c22
-rw-r--r--providers/fips/self_test_kats.c8
2 files changed, 18 insertions, 12 deletions
diff --git a/providers/fips/fipsprov.c b/providers/fips/fipsprov.c
index 3425133c60..1cbe5ed454 100644
--- a/providers/fips/fipsprov.c
+++ b/providers/fips/fipsprov.c
@@ -519,7 +519,8 @@ static const OSSL_ALGORITHM *fips_query(void *provctx, int operation_id,
case OSSL_OP_DIGEST:
return fips_digests;
case OSSL_OP_CIPHER:
- ossl_prov_cache_exported_algorithms(fips_ciphers, exported_fips_ciphers);
+ ossl_prov_cache_exported_algorithms(fips_ciphers,
+ exported_fips_ciphers);
return exported_fips_ciphers;
case OSSL_OP_MAC:
return fips_macs;
@@ -544,7 +545,7 @@ static const OSSL_ALGORITHM *fips_query(void *provctx, int operation_id,
static void fips_teardown(void *provctx)
{
OPENSSL_CTX_free(PROV_LIBRARY_CONTEXT_OF(provctx));
- PROV_CTX_free(provctx);
+ ossl_prov_ctx_free(provctx);
}
static void fips_intern_teardown(void *provctx)
@@ -553,7 +554,7 @@ static void fips_intern_teardown(void *provctx)
* We know that the library context is the same as for the outer provider,
* so no need to destroy it here.
*/
- PROV_CTX_free(provctx);
+ ossl_prov_ctx_free(provctx);
}
/* Functions we provide to the core */
@@ -690,7 +691,7 @@ int OSSL_provider_init(const OSSL_CORE_HANDLE *handle,
fips_security_checks = 0;
/* Create a context. */
- if ((*provctx = PROV_CTX_new()) == NULL
+ if ((*provctx = ossl_prov_ctx_new()) == NULL
|| (libctx = OPENSSL_CTX_new()) == NULL) {
/*
* We free libctx separately here and only here because it hasn't
@@ -700,8 +701,8 @@ int OSSL_provider_init(const OSSL_CORE_HANDLE *handle,
OPENSSL_CTX_free(libctx);
goto err;
}
- PROV_CTX_set0_library_context(*provctx, libctx);
- PROV_CTX_set0_handle(*provctx, handle);
+ ossl_prov_ctx_set0_library_context(*provctx, libctx);
+ ossl_prov_ctx_set0_handle(*provctx, handle);
if ((fgbl = openssl_ctx_get_data(libctx, OPENSSL_CTX_FIPS_PROV_INDEX,
&fips_prov_ossl_ctx_method)) == NULL)
@@ -754,7 +755,7 @@ int fips_intern_provider_init(const OSSL_CORE_HANDLE *handle,
if (c_internal_get_libctx == NULL)
return 0;
- if ((*provctx = PROV_CTX_new()) == NULL)
+ if ((*provctx = ossl_prov_ctx_new()) == NULL)
return 0;
/*
@@ -762,9 +763,10 @@ int fips_intern_provider_init(const OSSL_CORE_HANDLE *handle,
* internal provider. This is not something that most providers would be
* able to do.
*/
- PROV_CTX_set0_library_context(*provctx,
- (OPENSSL_CTX *)c_internal_get_libctx(handle));
- PROV_CTX_set0_handle(*provctx, handle);
+ ossl_prov_ctx_set0_library_context(
+ *provctx, (OPENSSL_CTX *)c_internal_get_libctx(handle)
+ );
+ ossl_prov_ctx_set0_handle(*provctx, handle);
*out = intern_dispatch_table;
return 1;
diff --git a/providers/fips/self_test_kats.c b/providers/fips/self_test_kats.c
index 50a0a69609..5e76a1c84d 100644
--- a/providers/fips/self_test_kats.c
+++ b/providers/fips/self_test_kats.c
@@ -315,7 +315,10 @@ static int self_test_drbg(const ST_KAT_DRBG *t, OSSL_SELF_TEST *st,
if (!EVP_RAND_set_ctx_params(test, drbg_params))
goto err;
- /* This calls PROV_DRBG_reseed() internally when prediction_resistance = 1 */
+ /*
+ * This calls ossl_prov_drbg_reseed() internally when
+ * prediction_resistance = 1
+ */
if (!EVP_RAND_generate(drbg, out, t->expectedlen, strength,
prediction_resistance,
t->entropyaddin2, t->entropyaddin2len))
@@ -329,7 +332,8 @@ static int self_test_drbg(const ST_KAT_DRBG *t, OSSL_SELF_TEST *st,
if (!EVP_RAND_uninstantiate(drbg))
goto err;
/*
- * Check that the DRBG data has been zeroized after PROV_DRBG_uninstantiate.
+ * Check that the DRBG data has been zeroized after
+ * ossl_prov_drbg_uninstantiate.
*/
if (!EVP_RAND_verify_zeroization(drbg))
goto err;