diff options
author | Pauli <paul.dale@oracle.com> | 2020-09-28 12:28:29 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2020-09-29 16:31:46 +1000 |
commit | 1be63951f87dfcbc98efe5d94a15298fea885890 (patch) | |
tree | 083ab242e6cf6521377635b5f0daacedfe937dbe /providers/implementations/encode_decode | |
parent | 5e26c3399d154b9ed29558129ca1916a1b5b095e (diff) |
prov: prefix all OSSL_DISPATCH tables names with ossl_
This stops them leaking into other namespaces in a static build.
They remain internal.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13013)
Diffstat (limited to 'providers/implementations/encode_decode')
5 files changed, 14 insertions, 12 deletions
diff --git a/providers/implementations/encode_decode/decode_der2key.c b/providers/implementations/encode_decode/decode_der2key.c index 12f5efd153..64b085673a 100644 --- a/providers/implementations/encode_decode/decode_der2key.c +++ b/providers/implementations/encode_decode/decode_der2key.c @@ -270,7 +270,8 @@ static int der2key_export_object(void *vctx, #define IMPLEMENT_NEWCTX(KEYTYPEstr, KEYTYPE, keytype, extract, free) \ static const struct keytype_desc_st keytype##_desc = \ - { EVP_PKEY_##KEYTYPE, KEYTYPEstr, keytype##_keymgmt_functions, \ + { EVP_PKEY_##KEYTYPE, KEYTYPEstr, \ + ossl_##keytype##_keymgmt_functions, \ (extract_key_fn *)extract, \ (free_key_fn *)free }; \ static OSSL_FUNC_decoder_newctx_fn der2##keytype##_newctx; \ @@ -278,7 +279,7 @@ static int der2key_export_object(void *vctx, { \ return der2key_newctx(provctx, &keytype##_desc); \ } \ - const OSSL_DISPATCH der_to_##keytype##_decoder_functions[] = { \ + const OSSL_DISPATCH ossl_der_to_##keytype##_decoder_functions[] = { \ { OSSL_FUNC_DECODER_NEWCTX, \ (void (*)(void))der2##keytype##_newctx }, \ { OSSL_FUNC_DECODER_FREECTX, \ diff --git a/providers/implementations/encode_decode/decode_ms2key.c b/providers/implementations/encode_decode/decode_ms2key.c index 707e6bc08f..1bc55e5493 100644 --- a/providers/implementations/encode_decode/decode_ms2key.c +++ b/providers/implementations/encode_decode/decode_ms2key.c @@ -242,13 +242,14 @@ static int ms2key_export_object(void *vctx, return ms2key_newctx(provctx, &keytype##_desc); \ } \ static const struct keytype_desc_st keytype##_desc = \ - { EVP_PKEY_##KEYTYPE, KEYTYPEstr, keytype##_keymgmt_functions, \ + { EVP_PKEY_##KEYTYPE, KEYTYPEstr, \ + ossl_##keytype##_keymgmt_functions, \ (extract_key_fn *)extract, \ (free_key_fn *)free } #define IMPLEMENT_MS(mstype, keytype) \ const OSSL_DISPATCH \ - mstype##_to_##keytype##_decoder_functions[] = { \ + ossl_##mstype##_to_##keytype##_decoder_functions[] = { \ { OSSL_FUNC_DECODER_NEWCTX, \ (void (*)(void))ms2##keytype##_newctx }, \ { OSSL_FUNC_DECODER_FREECTX, \ diff --git a/providers/implementations/encode_decode/decode_pem2der.c b/providers/implementations/encode_decode/decode_pem2der.c index 6e669884de..99ca7e8210 100644 --- a/providers/implementations/encode_decode/decode_pem2der.c +++ b/providers/implementations/encode_decode/decode_pem2der.c @@ -158,7 +158,7 @@ static int pem2der_decode(void *vctx, OSSL_CORE_BIO *cin, return ok; } -const OSSL_DISPATCH pem_to_der_decoder_functions[] = { +const OSSL_DISPATCH ossl_pem_to_der_decoder_functions[] = { { OSSL_FUNC_DECODER_NEWCTX, (void (*)(void))pem2der_newctx }, { OSSL_FUNC_DECODER_FREECTX, (void (*)(void))pem2der_freectx }, { OSSL_FUNC_DECODER_GETTABLE_PARAMS, diff --git a/providers/implementations/encode_decode/encode_key2any.c b/providers/implementations/encode_decode/encode_key2any.c index bb82c0ad4a..dc7ccbc2c0 100644 --- a/providers/implementations/encode_decode/encode_key2any.c +++ b/providers/implementations/encode_decode/encode_key2any.c @@ -873,12 +873,12 @@ static int key2any_encode_params(struct key2any_ctx_st *ctx, const OSSL_PARAM params[]) \ { \ struct key2any_ctx_st *ctx = vctx; \ - return ossl_prov_import_key(impl##_keymgmt_functions, \ + return ossl_prov_import_key(ossl_##impl##_keymgmt_functions, \ ctx->provctx, selection, params); \ } \ static void impl##2##output##_free_object(void *key) \ { \ - ossl_prov_free_key(impl##_keymgmt_functions, key); \ + ossl_prov_free_key(ossl_##impl##_keymgmt_functions, key); \ } \ static int \ impl##2##output##_encode(void *ctx, OSSL_CORE_BIO *cout, \ @@ -915,7 +915,7 @@ static int key2any_encode_params(struct key2any_ctx_st *ctx, ERR_raise(ERR_LIB_PROV, ERR_R_PASSED_INVALID_ARGUMENT); \ return 0; \ } \ - const OSSL_DISPATCH impl##_to_##output##_encoder_functions[] = { \ + const OSSL_DISPATCH ossl_##impl##_to_##output##_encoder_functions[] = { \ { OSSL_FUNC_ENCODER_NEWCTX, \ (void (*)(void))key2any_newctx }, \ { OSSL_FUNC_ENCODER_FREECTX, \ diff --git a/providers/implementations/encode_decode/encode_key2text.c b/providers/implementations/encode_decode/encode_key2text.c index d5e8019081..ef9b4a91e1 100644 --- a/providers/implementations/encode_decode/encode_key2text.c +++ b/providers/implementations/encode_decode/encode_key2text.c @@ -841,17 +841,17 @@ static int key2text_encode(void *vctx, const void *key, int selection, \ static int impl##2text_get_params(OSSL_PARAM params[]) \ { \ - return key2text_get_params(params, impl##_input_type); \ + return key2text_get_params(params, impl##_input_type); \ } \ static void *impl##2text_import_object(void *ctx, int selection, \ const OSSL_PARAM params[]) \ { \ - return ossl_prov_import_key(impl##_keymgmt_functions, \ + return ossl_prov_import_key(ossl_##impl##_keymgmt_functions, \ ctx, selection, params); \ } \ static void impl##2text_free_object(void *key) \ { \ - ossl_prov_free_key(impl##_keymgmt_functions, key); \ + ossl_prov_free_key(ossl_##impl##_keymgmt_functions, key); \ } \ static int impl##2text_encode(void *vctx, OSSL_CORE_BIO *cout, \ const void *key, \ @@ -868,7 +868,7 @@ static int key2text_encode(void *vctx, const void *key, int selection, return key2text_encode(vctx, key, selection, cout, \ type##_to_text, cb, cbarg); \ } \ - const OSSL_DISPATCH impl##_to_text_encoder_functions[] = { \ + const OSSL_DISPATCH ossl_##impl##_to_text_encoder_functions[] = { \ { OSSL_FUNC_ENCODER_NEWCTX, \ (void (*)(void))key2text_newctx }, \ { OSSL_FUNC_ENCODER_FREECTX, \ |