summaryrefslogtreecommitdiffstats
path: root/providers
diff options
context:
space:
mode:
authorDr. Matthias St. Pierre <matthias.st.pierre@ncp-e.com>2020-06-21 01:19:16 +0200
committerDr. Matthias St. Pierre <matthias.st.pierre@ncp-e.com>2020-06-24 22:01:22 +0200
commit363b1e5daea4a01889e6ff27148018be63d33b9b (patch)
tree9e6f5fe3be912b433fa848c44df11a15d0aa2921 /providers
parent23c48d94d4d34eedc15fa65e0fa0e38a6137e09f (diff)
Make the naming scheme for dispatched functions more consistent
The new naming scheme consistently usese the `OSSL_FUNC_` prefix for all functions which are dispatched between the core and providers. This change includes in particular all up- and downcalls, i.e., the dispatched functions passed from core to provider and vice versa. - OSSL_core_ -> OSSL_FUNC_core_ - OSSL_provider_ -> OSSL_FUNC_core_ For operations and their function dispatch tables, the following convention is used: Type | Name (evp_generic_fetch(3)) | ---------------------|-----------------------------------| operation | OSSL_OP_FOO | function id | OSSL_FUNC_FOO_FUNCTION_NAME | function "name" | OSSL_FUNC_foo_function_name | function typedef | OSSL_FUNC_foo_function_name_fn | function ptr getter | OSSL_FUNC_foo_function_name | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/12222)
Diffstat (limited to 'providers')
-rw-r--r--providers/common/bio_prov.c24
-rw-r--r--providers/common/include/prov/providercommon.h2
-rw-r--r--providers/defltprov.c18
-rw-r--r--providers/fips/fipsprov.c114
-rw-r--r--providers/fips/self_test.c2
-rw-r--r--providers/fips/self_test.h8
-rw-r--r--providers/implementations/asymciphers/rsa_enc.c22
-rw-r--r--providers/implementations/ciphers/cipher_aes.c4
-rw-r--r--providers/implementations/ciphers/cipher_aes_cbc_hmac_sha.c18
-rw-r--r--providers/implementations/ciphers/cipher_aes_ccm.c2
-rw-r--r--providers/implementations/ciphers/cipher_aes_gcm.c2
-rw-r--r--providers/implementations/ciphers/cipher_aes_ocb.c22
-rw-r--r--providers/implementations/ciphers/cipher_aes_siv.c4
-rw-r--r--providers/implementations/ciphers/cipher_aes_wrp.c14
-rw-r--r--providers/implementations/ciphers/cipher_aes_xts.c22
-rw-r--r--providers/implementations/ciphers/cipher_aria.c4
-rw-r--r--providers/implementations/ciphers/cipher_aria_ccm.c2
-rw-r--r--providers/implementations/ciphers/cipher_aria_gcm.c2
-rw-r--r--providers/implementations/ciphers/cipher_blowfish.c4
-rw-r--r--providers/implementations/ciphers/cipher_camellia.c4
-rw-r--r--providers/implementations/ciphers/cipher_cast5.c4
-rw-r--r--providers/implementations/ciphers/cipher_chacha20.c14
-rw-r--r--providers/implementations/ciphers/cipher_chacha20.h4
-rw-r--r--providers/implementations/ciphers/cipher_chacha20_poly1305.c20
-rw-r--r--providers/implementations/ciphers/cipher_des.c14
-rw-r--r--providers/implementations/ciphers/cipher_idea.c4
-rw-r--r--providers/implementations/ciphers/cipher_null.c16
-rw-r--r--providers/implementations/ciphers/cipher_rc2.c12
-rw-r--r--providers/implementations/ciphers/cipher_rc4.c8
-rw-r--r--providers/implementations/ciphers/cipher_rc4_hmac_md5.c14
-rw-r--r--providers/implementations/ciphers/cipher_rc5.c12
-rw-r--r--providers/implementations/ciphers/cipher_seed.c4
-rw-r--r--providers/implementations/ciphers/cipher_sm4.c4
-rw-r--r--providers/implementations/ciphers/cipher_tdes.h16
-rw-r--r--providers/implementations/ciphers/cipher_tdes_wrap.c8
-rw-r--r--providers/implementations/digests/blake2_prov.c4
-rw-r--r--providers/implementations/digests/md5_sha1_prov.c4
-rw-r--r--providers/implementations/digests/mdc2_prov.c4
-rw-r--r--providers/implementations/digests/sha2_prov.c4
-rw-r--r--providers/implementations/digests/sha3_prov.c18
-rw-r--r--providers/implementations/exchange/dh_exch.c16
-rw-r--r--providers/implementations/exchange/ecdh_exch.c20
-rw-r--r--providers/implementations/exchange/ecx_exch.c14
-rw-r--r--providers/implementations/include/prov/ciphercommon.h36
-rw-r--r--providers/implementations/include/prov/ciphercommon_aead.h4
-rw-r--r--providers/implementations/include/prov/ciphercommon_ccm.h14
-rw-r--r--providers/implementations/include/prov/ciphercommon_gcm.h14
-rw-r--r--providers/implementations/include/prov/digestcommon.h10
-rw-r--r--providers/implementations/kdfs/hkdf.c16
-rw-r--r--providers/implementations/kdfs/kbkdf.c12
-rw-r--r--providers/implementations/kdfs/krb5kdf.c16
-rw-r--r--providers/implementations/kdfs/pbkdf2.c12
-rw-r--r--providers/implementations/kdfs/scrypt.c12
-rw-r--r--providers/implementations/kdfs/sshkdf.c16
-rw-r--r--providers/implementations/kdfs/sskdf.c18
-rw-r--r--providers/implementations/kdfs/tls1_prf.c12
-rw-r--r--providers/implementations/kdfs/x942kdf.c16
-rw-r--r--providers/implementations/keymgmt/dh_kmgmt.c38
-rw-r--r--providers/implementations/keymgmt/dsa_kmgmt.c34
-rw-r--r--providers/implementations/keymgmt/ec_kmgmt.c40
-rw-r--r--providers/implementations/keymgmt/ecx_kmgmt.c70
-rw-r--r--providers/implementations/keymgmt/rsa_kmgmt.c40
-rw-r--r--providers/implementations/macs/blake2_mac_impl.c20
-rw-r--r--providers/implementations/macs/cmac_prov.c20
-rw-r--r--providers/implementations/macs/gmac_prov.c20
-rw-r--r--providers/implementations/macs/hmac_prov.c20
-rw-r--r--providers/implementations/macs/kmac_prov.c24
-rw-r--r--providers/implementations/macs/poly1305_prov.c20
-rw-r--r--providers/implementations/macs/siphash_prov.c22
-rw-r--r--providers/implementations/rands/crngt.c2
-rw-r--r--providers/implementations/rands/drbg.c12
-rw-r--r--providers/implementations/rands/drbg_ctr.c22
-rw-r--r--providers/implementations/rands/drbg_hash.c24
-rw-r--r--providers/implementations/rands/drbg_hmac.c22
-rw-r--r--providers/implementations/rands/drbg_local.h20
-rw-r--r--providers/implementations/rands/test_rng.c26
-rw-r--r--providers/implementations/serializers/serializer_common.c12
-rw-r--r--providers/implementations/serializers/serializer_dh.c6
-rw-r--r--providers/implementations/serializers/serializer_dh_param.c34
-rw-r--r--providers/implementations/serializers/serializer_dh_priv.c44
-rw-r--r--providers/implementations/serializers/serializer_dh_pub.c34
-rw-r--r--providers/implementations/serializers/serializer_dsa.c6
-rw-r--r--providers/implementations/serializers/serializer_dsa_param.c34
-rw-r--r--providers/implementations/serializers/serializer_dsa_priv.c44
-rw-r--r--providers/implementations/serializers/serializer_dsa_pub.c34
-rw-r--r--providers/implementations/serializers/serializer_ec.c6
-rw-r--r--providers/implementations/serializers/serializer_ec_param.c34
-rw-r--r--providers/implementations/serializers/serializer_ec_priv.c44
-rw-r--r--providers/implementations/serializers/serializer_ec_pub.c34
-rw-r--r--providers/implementations/serializers/serializer_ecx.c6
-rw-r--r--providers/implementations/serializers/serializer_ecx_priv.c46
-rw-r--r--providers/implementations/serializers/serializer_ecx_pub.c42
-rw-r--r--providers/implementations/serializers/serializer_local.h40
-rw-r--r--providers/implementations/serializers/serializer_rsa.c6
-rw-r--r--providers/implementations/serializers/serializer_rsa_priv.c44
-rw-r--r--providers/implementations/serializers/serializer_rsa_pub.c34
-rw-r--r--providers/implementations/signature/dsa.c42
-rw-r--r--providers/implementations/signature/ecdsa.c42
-rw-r--r--providers/implementations/signature/eddsa.c16
-rw-r--r--providers/implementations/signature/rsa.c46
-rw-r--r--providers/legacyprov.c18
101 files changed, 992 insertions, 992 deletions
diff --git a/providers/common/bio_prov.c b/providers/common/bio_prov.c
index 2186894b11..c193658c58 100644
--- a/providers/common/bio_prov.c
+++ b/providers/common/bio_prov.c
@@ -12,12 +12,12 @@
#include "internal/cryptlib.h"
#include "prov/bio.h"
-static OSSL_BIO_new_file_fn *c_bio_new_file = NULL;
-static OSSL_BIO_new_membuf_fn *c_bio_new_membuf = NULL;
-static OSSL_BIO_read_ex_fn *c_bio_read_ex = NULL;
-static OSSL_BIO_write_ex_fn *c_bio_write_ex = NULL;
-static OSSL_BIO_free_fn *c_bio_free = NULL;
-static OSSL_BIO_vprintf_fn *c_bio_vprintf = NULL;
+static OSSL_FUNC_BIO_new_file_fn *c_bio_new_file = NULL;
+static OSSL_FUNC_BIO_new_membuf_fn *c_bio_new_membuf = NULL;
+static OSSL_FUNC_BIO_read_ex_fn *c_bio_read_ex = NULL;
+static OSSL_FUNC_BIO_write_ex_fn *c_bio_write_ex = NULL;
+static OSSL_FUNC_BIO_free_fn *c_bio_free = NULL;
+static OSSL_FUNC_BIO_vprintf_fn *c_bio_vprintf = NULL;
int ossl_prov_bio_from_dispatch(const OSSL_DISPATCH *fns)
{
@@ -25,27 +25,27 @@ int ossl_prov_bio_from_dispatch(const OSSL_DISPATCH *fns)
switch (fns->function_id) {
case OSSL_FUNC_BIO_NEW_FILE:
if (c_bio_new_file == NULL)
- c_bio_new_file = OSSL_get_BIO_new_file(fns);
+ c_bio_new_file = OSSL_FUNC_BIO_new_file(fns);
break;
case OSSL_FUNC_BIO_NEW_MEMBUF:
if (c_bio_new_membuf == NULL)
- c_bio_new_membuf = OSSL_get_BIO_new_membuf(fns);
+ c_bio_new_membuf = OSSL_FUNC_BIO_new_membuf(fns);
break;
case OSSL_FUNC_BIO_READ_EX:
if (c_bio_read_ex == NULL)
- c_bio_read_ex = OSSL_get_BIO_read_ex(fns);
+ c_bio_read_ex = OSSL_FUNC_BIO_read_ex(fns);
break;
case OSSL_FUNC_BIO_WRITE_EX:
if (c_bio_write_ex == NULL)
- c_bio_write_ex = OSSL_get_BIO_write_ex(fns);
+ c_bio_write_ex = OSSL_FUNC_BIO_write_ex(fns);
break;
case OSSL_FUNC_BIO_FREE:
if (c_bio_free == NULL)
- c_bio_free = OSSL_get_BIO_free(fns);
+ c_bio_free = OSSL_FUNC_BIO_free(fns);
break;
case OSSL_FUNC_BIO_VPRINTF:
if (c_bio_vprintf == NULL)
- c_bio_vprintf = OSSL_get_BIO_vprintf(fns);
+ c_bio_vprintf = OSSL_FUNC_BIO_vprintf(fns);
break;
}
}
diff --git a/providers/common/include/prov/providercommon.h b/providers/common/include/prov/providercommon.h
index 2a614f5d81..f39d2e313f 100644
--- a/providers/common/include/prov/providercommon.h
+++ b/providers/common/include/prov/providercommon.h
@@ -17,4 +17,4 @@ const char *ossl_prov_util_nid_to_name(int nid);
int cipher_capable_aes_cbc_hmac_sha1(void);
int cipher_capable_aes_cbc_hmac_sha256(void);
-OSSL_provider_get_capabilities_fn provider_get_capabilities;
+OSSL_FUNC_provider_get_capabilities_fn provider_get_capabilities;
diff --git a/providers/defltprov.c b/providers/defltprov.c
index 1ea3604377..c92736e547 100644
--- a/providers/defltprov.c
+++ b/providers/defltprov.c
@@ -25,16 +25,16 @@
* Forward declarations to ensure that interface functions are correctly
* defined.
*/
-static OSSL_provider_gettable_params_fn deflt_gettable_params;
-static OSSL_provider_get_params_fn deflt_get_params;
-static OSSL_provider_query_operation_fn deflt_query;
+static OSSL_FUNC_provider_gettable_params_fn deflt_gettable_params;
+static OSSL_FUNC_provider_get_params_fn deflt_get_params;
+static OSSL_FUNC_provider_query_operation_fn deflt_query;
#define ALGC(NAMES, FUNC, CHECK) { { NAMES, "provider=default", FUNC }, CHECK }
#define ALG(NAMES, FUNC) ALGC(NAMES, FUNC, NULL)
/* Functions provided by the core */
-static OSSL_core_gettable_params_fn *c_gettable_params = NULL;
-static OSSL_core_get_params_fn *c_get_params = NULL;
+static OSSL_FUNC_core_gettable_params_fn *c_gettable_params = NULL;
+static OSSL_FUNC_core_get_params_fn *c_get_params = NULL;
/* Parameters we provide to the core */
static const OSSL_PARAM deflt_param_types[] = {
@@ -584,7 +584,7 @@ int ossl_default_provider_init(const OSSL_CORE_HANDLE *handle,
const OSSL_DISPATCH **out,
void **provctx)
{
- OSSL_core_get_library_context_fn *c_get_libctx = NULL;
+ OSSL_FUNC_core_get_library_context_fn *c_get_libctx = NULL;
BIO_METHOD *corebiometh;
if (!ossl_prov_bio_from_dispatch(in))
@@ -592,13 +592,13 @@ int ossl_default_provider_init(const OSSL_CORE_HANDLE *handle,
for (; in->function_id != 0; in++) {
switch (in->function_id) {
case OSSL_FUNC_CORE_GETTABLE_PARAMS:
- c_gettable_params = OSSL_get_core_gettable_params(in);
+