summaryrefslogtreecommitdiffstats
path: root/providers
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
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')
-rw-r--r--providers/baseprov.c15
-rw-r--r--providers/common/bio_prov.c2
-rw-r--r--providers/common/include/prov/provider_ctx.h18
-rw-r--r--providers/common/provider_ctx.c16
-rw-r--r--providers/defltprov.c15
-rw-r--r--providers/fips/fipsprov.c22
-rw-r--r--providers/fips/self_test_kats.c8
-rw-r--r--providers/implementations/ciphers/cipher_aes.h18
-rw-r--r--providers/implementations/ciphers/cipher_aes_cbc_hmac_sha.c4
-rw-r--r--providers/implementations/ciphers/cipher_aes_cbc_hmac_sha.h4
-rw-r--r--providers/implementations/ciphers/cipher_aes_cbc_hmac_sha1_hw.c4
-rw-r--r--providers/implementations/ciphers/cipher_aes_cbc_hmac_sha256_hw.c4
-rw-r--r--providers/implementations/ciphers/cipher_aes_ccm.c2
-rw-r--r--providers/implementations/ciphers/cipher_aes_ccm.h2
-rw-r--r--providers/implementations/ciphers/cipher_aes_ccm_hw.c2
-rw-r--r--providers/implementations/ciphers/cipher_aes_ccm_hw_aesni.inc2
-rw-r--r--providers/implementations/ciphers/cipher_aes_ccm_hw_s390x.inc2
-rw-r--r--providers/implementations/ciphers/cipher_aes_ccm_hw_t4.inc2
-rw-r--r--providers/implementations/ciphers/cipher_aes_gcm.c2
-rw-r--r--providers/implementations/ciphers/cipher_aes_gcm.h2
-rw-r--r--providers/implementations/ciphers/cipher_aes_gcm_hw.c2
-rw-r--r--providers/implementations/ciphers/cipher_aes_gcm_hw_aesni.inc2
-rw-r--r--providers/implementations/ciphers/cipher_aes_gcm_hw_armv8.inc2
-rw-r--r--providers/implementations/ciphers/cipher_aes_gcm_hw_s390x.inc2
-rw-r--r--providers/implementations/ciphers/cipher_aes_gcm_hw_t4.inc2
-rw-r--r--providers/implementations/ciphers/cipher_aes_hw.c2
-rw-r--r--providers/implementations/ciphers/cipher_aes_ocb.c2
-rw-r--r--providers/implementations/ciphers/cipher_aes_ocb.h2
-rw-r--r--providers/implementations/ciphers/cipher_aes_ocb_hw.c2
-rw-r--r--providers/implementations/ciphers/cipher_aes_siv.c2
-rw-r--r--providers/implementations/ciphers/cipher_aes_siv.h2
-rw-r--r--providers/implementations/ciphers/cipher_aes_siv_hw.c2
-rw-r--r--providers/implementations/ciphers/cipher_aes_xts.c2
-rw-r--r--providers/implementations/ciphers/cipher_aes_xts.h2
-rw-r--r--providers/implementations/ciphers/cipher_aes_xts_hw.c2
-rw-r--r--providers/implementations/ciphers/cipher_aria.h18
-rw-r--r--providers/implementations/ciphers/cipher_aria_ccm.c2
-rw-r--r--providers/implementations/ciphers/cipher_aria_ccm.h2
-rw-r--r--providers/implementations/ciphers/cipher_aria_ccm_hw.c2
-rw-r--r--providers/implementations/ciphers/cipher_aria_gcm.c4
-rw-r--r--providers/implementations/ciphers/cipher_aria_gcm.h2
-rw-r--r--providers/implementations/ciphers/cipher_aria_gcm_hw.c2
-rw-r--r--providers/implementations/ciphers/cipher_aria_hw.c2
-rw-r--r--providers/implementations/ciphers/cipher_blowfish.h8
-rw-r--r--providers/implementations/ciphers/cipher_blowfish_hw.c2
-rw-r--r--providers/implementations/ciphers/cipher_camellia.h18
-rw-r--r--providers/implementations/ciphers/cipher_camellia_hw.c2
-rw-r--r--providers/implementations/ciphers/cipher_cast.h8
-rw-r--r--providers/implementations/ciphers/cipher_cast5_hw.c2
-rw-r--r--providers/implementations/ciphers/cipher_chacha20.c2
-rw-r--r--providers/implementations/ciphers/cipher_chacha20.h2
-rw-r--r--providers/implementations/ciphers/cipher_chacha20_hw.c2
-rw-r--r--providers/implementations/ciphers/cipher_chacha20_poly1305.c4
-rw-r--r--providers/implementations/ciphers/cipher_chacha20_poly1305.h2
-rw-r--r--providers/implementations/ciphers/cipher_chacha20_poly1305_hw.c2
-rw-r--r--providers/implementations/ciphers/cipher_desx_hw.c3
-rw-r--r--providers/implementations/ciphers/cipher_idea.h8
-rw-r--r--providers/implementations/ciphers/cipher_idea_hw.c2
-rw-r--r--providers/implementations/ciphers/cipher_rc2.c3
-rw-r--r--providers/implementations/ciphers/cipher_rc2.h12
-rw-r--r--providers/implementations/ciphers/cipher_rc2_hw.c2
-rw-r--r--providers/implementations/ciphers/cipher_rc4.c2
-rw-r--r--providers/implementations/ciphers/cipher_rc4.h2
-rw-r--r--providers/implementations/ciphers/cipher_rc4_hmac_md5.c2
-rw-r--r--providers/implementations/ciphers/cipher_rc4_hmac_md5.h2
-rw-r--r--providers/implementations/ciphers/cipher_rc4_hmac_md5_hw.c3
-rw-r--r--providers/implementations/ciphers/cipher_rc4_hw.c2
-rw-r--r--providers/implementations/ciphers/cipher_rc5.c3
-rw-r--r--providers/implementations/ciphers/cipher_rc5.h8
-rw-r--r--providers/implementations/ciphers/cipher_rc5_hw.c2
-rw-r--r--providers/implementations/ciphers/cipher_seed.h8
-rw-r--r--providers/implementations/ciphers/cipher_seed_hw.c2
-rw-r--r--providers/implementations/ciphers/cipher_sm4.h10
-rw-r--r--providers/implementations/ciphers/cipher_sm4_hw.c2
-rw-r--r--providers/implementations/ciphers/cipher_tdes.h9
-rw-r--r--providers/implementations/ciphers/cipher_tdes_default.h20
-rw-r--r--providers/implementations/ciphers/cipher_tdes_wrap.c2
-rw-r--r--providers/implementations/encode_decode/encode_key2any.c2
-rw-r--r--providers/implementations/include/prov/ciphercommon.h2
-rw-r--r--providers/implementations/rands/drbg.c28
-rw-r--r--providers/implementations/rands/drbg_ctr.c14
-rw-r--r--providers/implementations/rands/drbg_hash.c14
-rw-r--r--providers/implementations/rands/drbg_hmac.c14
-rw-r--r--providers/implementations/rands/drbg_local.h20
-rw-r--r--providers/implementations/rands/test_rng.c6
-rw-r--r--providers/implementations/storemgmt/file_store.c2
-rw-r--r--providers/legacyprov.c8
87 files changed, 248 insertions, 235 deletions
diff --git a/providers/baseprov.c b/providers/baseprov.c
index aeb81e27e3..41dc65655e 100644
--- a/providers/baseprov.c
+++ b/providers/baseprov.c
@@ -116,8 +116,8 @@ static const OSSL_ALGORITHM *base_query(void *provctx, int operation_id,
static void base_teardown(void *provctx)
{
- BIO_meth_free(PROV_CTX_get0_core_bio_method(provctx));
- PROV_CTX_free(provctx);
+ BIO_meth_free(ossl_prov_ctx_get0_core_bio_method(provctx));
+ ossl_prov_ctx_free(provctx);
}
/* Functions we provide to the core */
@@ -169,15 +169,16 @@ int ossl_base_provider_init(const OSSL_CORE_HANDLE *handle,
* This only works for built-in providers. Most providers should
* create their own library context.
*/
- if ((*provctx = PROV_CTX_new()) == NULL
+ if ((*provctx = ossl_prov_ctx_new()) == NULL
|| (corebiometh = bio_prov_init_bio_method()) == NULL) {
- PROV_CTX_free(*provctx);
+ ossl_prov_ctx_free(*provctx);
*provctx = NULL;
return 0;
}
- PROV_CTX_set0_library_context(*provctx, (OPENSSL_CTX *)c_get_libctx(handle));
- PROV_CTX_set0_handle(*provctx, handle);
- PROV_CTX_set0_core_bio_method(*provctx, corebiometh);
+ ossl_prov_ctx_set0_library_context(*provctx,
+ (OPENSSL_CTX *)c_get_libctx(handle));
+ ossl_prov_ctx_set0_handle(*provctx, handle);
+ ossl_prov_ctx_set0_core_bio_method(*provctx, corebiometh);
*out = base_dispatch_table;
diff --git a/providers/common/bio_prov.c b/providers/common/bio_prov.c
index c049795cd1..afdeb80d80 100644
--- a/providers/common/bio_prov.c
+++ b/providers/common/bio_prov.c
@@ -213,7 +213,7 @@ BIO_METHOD *bio_prov_init_bio_method(void)
BIO *bio_new_from_core_bio(PROV_CTX *provctx, OSSL_CORE_BIO *corebio)
{
BIO *outbio;
- BIO_METHOD *corebiometh = PROV_CTX_get0_core_bio_method(provctx);
+ BIO_METHOD *corebiometh = ossl_prov_ctx_get0_core_bio_method(provctx);
if (corebiometh == NULL)
return NULL;
diff --git a/providers/common/include/prov/provider_ctx.h b/providers/common/include/prov/provider_ctx.h
index a252143e81..c650777280 100644
--- a/providers/common/include/prov/provider_ctx.h
+++ b/providers/common/include/prov/provider_ctx.h
@@ -26,15 +26,15 @@ typedef struct prov_ctx_st {
* fetching functions.
*/
# define PROV_LIBRARY_CONTEXT_OF(provctx) \
- PROV_CTX_get0_library_context((provctx))
+ ossl_prov_ctx_get0_library_context((provctx))
-PROV_CTX *PROV_CTX_new(void);
-void PROV_CTX_free(PROV_CTX *ctx);
-void PROV_CTX_set0_library_context(PROV_CTX *ctx, OPENSSL_CTX *libctx);
-void PROV_CTX_set0_handle(PROV_CTX *ctx, const OSSL_CORE_HANDLE *handle);
-void PROV_CTX_set0_core_bio_method(PROV_CTX *ctx, BIO_METHOD *corebiometh);
-OPENSSL_CTX *PROV_CTX_get0_library_context(PROV_CTX *ctx);
-const OSSL_CORE_HANDLE *PROV_CTX_get0_handle(PROV_CTX *ctx);
-BIO_METHOD *PROV_CTX_get0_core_bio_method(PROV_CTX *ctx);
+PROV_CTX *ossl_prov_ctx_new(void);
+void ossl_prov_ctx_free(PROV_CTX *ctx);
+void ossl_prov_ctx_set0_library_context(PROV_CTX *ctx, OPENSSL_CTX *libctx);
+void ossl_prov_ctx_set0_handle(PROV_CTX *ctx, const OSSL_CORE_HANDLE *handle);
+void ossl_prov_ctx_set0_core_bio_method(PROV_CTX *ctx, BIO_METHOD *corebiometh);
+OPENSSL_CTX *ossl_prov_ctx_get0_library_context(PROV_CTX *ctx);
+const OSSL_CORE_HANDLE *ossl_prov_ctx_get0_handle(PROV_CTX *ctx);
+BIO_METHOD *ossl_prov_ctx_get0_core_bio_method(PROV_CTX *ctx);
#endif
diff --git a/providers/common/provider_ctx.c b/providers/common/provider_ctx.c
index 04cca1f23e..6d81c20981 100644
--- a/providers/common/provider_ctx.c
+++ b/providers/common/provider_ctx.c
@@ -11,49 +11,49 @@
#include "prov/provider_ctx.h"
#include "prov/bio.h"
-PROV_CTX *PROV_CTX_new(void)
+PROV_CTX *ossl_prov_ctx_new(void)
{
return OPENSSL_zalloc(sizeof(PROV_CTX));
}
-void PROV_CTX_free(PROV_CTX *ctx)
+void ossl_prov_ctx_free(PROV_CTX *ctx)
{
OPENSSL_free(ctx);
}
-void PROV_CTX_set0_library_context(PROV_CTX *ctx, OPENSSL_CTX *libctx)
+void ossl_prov_ctx_set0_library_context(PROV_CTX *ctx, OPENSSL_CTX *libctx)
{
if (ctx != NULL)
ctx->libctx = libctx;
}
-void PROV_CTX_set0_handle(PROV_CTX *ctx, const OSSL_CORE_HANDLE *handle)
+void ossl_prov_ctx_set0_handle(PROV_CTX *ctx, const OSSL_CORE_HANDLE *handle)
{
if (ctx != NULL)
ctx->handle = handle;
}
-void PROV_CTX_set0_core_bio_method(PROV_CTX *ctx, BIO_METHOD *corebiometh)
+void ossl_prov_ctx_set0_core_bio_method(PROV_CTX *ctx, BIO_METHOD *corebiometh)
{
if (ctx != NULL)
ctx->corebiometh = corebiometh;
}
-OPENSSL_CTX *PROV_CTX_get0_library_context(PROV_CTX *ctx)
+OPENSSL_CTX *ossl_prov_ctx_get0_library_context(PROV_CTX *ctx)
{
if (ctx == NULL)
return NULL;
return ctx->libctx;
}
-const OSSL_CORE_HANDLE *PROV_CTX_get0_handle(PROV_CTX *ctx)
+const OSSL_CORE_HANDLE *ossl_prov_ctx_get0_handle(PROV_CTX *ctx)
{
if (ctx == NULL)
return NULL;
return ctx->handle;
}
-BIO_METHOD *PROV_CTX_get0_core_bio_method(PROV_CTX *ctx)
+BIO_METHOD *ossl_prov_ctx_get0_core_bio_method(PROV_CTX *ctx)
{
if (ctx == NULL)
return NULL;
diff --git a/providers/defltprov.c b/providers/defltprov.c
index 542e120c8f..06ce516041 100644
--- a/providers/defltprov.c
+++ b/providers/defltprov.c
@@ -502,8 +502,8 @@ static const OSSL_ALGORITHM *deflt_query(void *provctx, int operation_id,
static void deflt_teardown(void *provctx)
{
- BIO_meth_free(PROV_CTX_get0_core_bio_method(provctx));
- PROV_CTX_free(provctx);
+ BIO_meth_free(ossl_prov_ctx_get0_core_bio_method(provctx));
+ ossl_prov_ctx_free(provctx);
}
/* Functions we provide to the core */
@@ -556,15 +556,16 @@ int ossl_default_provider_init(const OSSL_CORE_HANDLE *handle,
* This only works for built-in providers. Most providers should
* create their own library context.
*/
- if ((*provctx = PROV_CTX_new()) == NULL
+ if ((*provctx = ossl_prov_ctx_new()) == NULL
|| (corebiometh = bio_prov_init_bio_method()) == NULL) {
- PROV_CTX_free(*provctx);
+ ossl_prov_ctx_free(*provctx);
*provctx = NULL;
return 0;
}
- PROV_CTX_set0_library_context(*provctx, (OPENSSL_CTX *)c_get_libctx(handle));
- PROV_CTX_set0_handle(*provctx, handle);
- PROV_CTX_set0_core_bio_method(*provctx, corebiometh);
+ ossl_prov_ctx_set0_library_context(*provctx,
+ (OPENSSL_CTX *)c_get_libctx(handle));
+ ossl_prov_ctx_set0_handle(*provctx, handle);
+ ossl_prov_ctx_set0_core_bio_method(*provctx, corebiometh);
*out = deflt_dispatch_table;
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);
}