diff options
author | Irak Rigia <tarakrigia@gmail.com> | 2023-04-19 19:38:22 +0530 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2023-04-21 16:19:11 +0200 |
commit | 1e6bd31e58dba0bb5d7f21cf1fe1e0d9e4ee3c30 (patch) | |
tree | 67e2fc35dd2e9c022239b6006b66c591898da40c /test | |
parent | 23e648962e04af132c0841bec950b8a89b87fb2d (diff) | |
download | openssl-new-1e6bd31e58dba0bb5d7f21cf1fe1e0d9e4ee3c30.tar.gz |
Replaced '{ 0, NULL }' with OSSL_DISPATCH_END in OSSL_DISPATCH arrays
Fixes #20710
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20745)
Diffstat (limited to 'test')
-rw-r--r-- | test/bio_core_test.c | 2 | ||||
-rw-r--r-- | test/fake_rsaprov.c | 8 | ||||
-rw-r--r-- | test/filterprov.c | 2 | ||||
-rw-r--r-- | test/p_test.c | 2 | ||||
-rw-r--r-- | test/provfetchtest.c | 10 | ||||
-rw-r--r-- | test/testutil/fake_random.c | 4 | ||||
-rw-r--r-- | test/tls-provider.c | 18 | ||||
-rw-r--r-- | test/upcallstest.c | 2 | ||||
-rw-r--r-- | test/user_property_test.c | 4 |
9 files changed, 26 insertions, 26 deletions
diff --git a/test/bio_core_test.c b/test/bio_core_test.c index 77e846735f..e3d6625382 100644 --- a/test/bio_core_test.c +++ b/test/bio_core_test.c @@ -61,7 +61,7 @@ static const OSSL_DISPATCH biocbs[] = { { OSSL_FUNC_BIO_CTRL, (void (*)(void))tst_bio_core_ctrl }, { OSSL_FUNC_BIO_UP_REF, (void (*)(void))tst_bio_core_up_ref }, { OSSL_FUNC_BIO_FREE, (void (*)(void))tst_bio_core_free }, - { 0, NULL } + OSSL_DISPATCH_END }; static int test_bio_core(void) diff --git a/test/fake_rsaprov.c b/test/fake_rsaprov.c index bbb74a2147..501da0b53b 100644 --- a/test/fake_rsaprov.c +++ b/test/fake_rsaprov.c @@ -277,7 +277,7 @@ static const OSSL_DISPATCH fake_rsa_keymgmt_funcs[] = { { OSSL_FUNC_KEYMGMT_GEN_INIT, (void (*)(void))fake_rsa_gen_init }, { OSSL_FUNC_KEYMGMT_GEN, (void (*)(void))fake_rsa_gen }, { OSSL_FUNC_KEYMGMT_GEN_CLEANUP, (void (*)(void))fake_rsa_gen_cleanup }, - { 0, NULL } + OSSL_DISPATCH_END }; static const OSSL_ALGORITHM fake_rsa_keymgmt_algs[] = { @@ -510,7 +510,7 @@ static const OSSL_DISPATCH fake_rsa_sig_funcs[] = { (void (*)(void))fake_rsa_dgstvfy_final }, { OSSL_FUNC_SIGNATURE_DIGEST_VERIFY, (void (*)(void))fake_rsa_dgstvfy }, - { 0, NULL } + OSSL_DISPATCH_END }; static const OSSL_ALGORITHM fake_rsa_sig_algs[] = { @@ -629,7 +629,7 @@ static const OSSL_DISPATCH fake_rsa_store_funcs[] = { { OSSL_FUNC_STORE_LOAD, (void (*)(void))fake_rsa_st_load }, { OSSL_FUNC_STORE_EOF, (void (*)(void))fake_rsa_st_eof }, { OSSL_FUNC_STORE_CLOSE, (void (*)(void))fake_rsa_st_close }, - { 0, NULL }, + OSSL_DISPATCH_END, }; static const OSSL_ALGORITHM fake_rsa_store_algs[] = { @@ -659,7 +659,7 @@ static const OSSL_ALGORITHM *fake_rsa_query(void *provctx, static const OSSL_DISPATCH fake_rsa_method[] = { { OSSL_FUNC_PROVIDER_TEARDOWN, (void (*)(void))OSSL_LIB_CTX_free }, { OSSL_FUNC_PROVIDER_QUERY_OPERATION, (void (*)(void))fake_rsa_query }, - { 0, NULL } + OSSL_DISPATCH_END }; static int fake_rsa_provider_init(const OSSL_CORE_HANDLE *handle, diff --git a/test/filterprov.c b/test/filterprov.c index e14c802b1d..c7cda32261 100644 --- a/test/filterprov.c +++ b/test/filterprov.c @@ -128,7 +128,7 @@ static const OSSL_DISPATCH filter_dispatch_table[] = { { OSSL_FUNC_PROVIDER_UNQUERY_OPERATION, (void (*)(void))filter_unquery }, { OSSL_FUNC_PROVIDER_GET_CAPABILITIES, (void (*)(void))filter_get_capabilities }, { OSSL_FUNC_PROVIDER_TEARDOWN, (void (*)(void))filter_teardown }, - { 0, NULL } + OSSL_DISPATCH_END }; int filter_provider_init(const OSSL_CORE_HANDLE *handle, diff --git a/test/p_test.c b/test/p_test.c index b922ec997b..fc9f179310 100644 --- a/test/p_test.c +++ b/test/p_test.c @@ -222,7 +222,7 @@ static const OSSL_DISPATCH p_test_table[] = { { OSSL_FUNC_PROVIDER_GET_REASON_STRINGS, (void (*)(void))p_get_reason_strings}, { OSSL_FUNC_PROVIDER_TEARDOWN, (void (*)(void))p_teardown }, - { 0, NULL } + OSSL_DISPATCH_END }; int OSSL_provider_init(const OSSL_CORE_HANDLE *handle, diff --git a/test/provfetchtest.c b/test/provfetchtest.c index 11a59ab63e..12f744a688 100644 --- a/test/provfetchtest.c +++ b/test/provfetchtest.c @@ -25,7 +25,7 @@ static int dummy_decoder_decode(void *ctx, OSSL_CORE_BIO *cin, int selection, static const OSSL_DISPATCH dummy_decoder_functions[] = { { OSSL_FUNC_DECODER_DECODE, (void (*)(void))dummy_decoder_decode }, - { 0, NULL } + OSSL_DISPATCH_END }; static const OSSL_ALGORITHM dummy_decoders[] = { @@ -43,7 +43,7 @@ static int dummy_encoder_encode(void *ctx, OSSL_CORE_BIO *out, static const OSSL_DISPATCH dummy_encoder_functions[] = { { OSSL_FUNC_DECODER_DECODE, (void (*)(void))dummy_encoder_encode }, - { 0, NULL } + OSSL_DISPATCH_END }; static const OSSL_ALGORITHM dummy_encoders[] = { @@ -78,7 +78,7 @@ static const OSSL_DISPATCH dummy_store_functions[] = { { OSSL_FUNC_STORE_LOAD, (void (*)(void))dummy_store_load }, { OSSL_FUNC_STORE_EOF, (void (*)(void))dumm_store_eof }, { OSSL_FUNC_STORE_CLOSE, (void (*)(void))dummy_store_close }, - { 0, NULL } + OSSL_DISPATCH_END }; static const OSSL_ALGORITHM dummy_store[] = { @@ -167,7 +167,7 @@ static const OSSL_DISPATCH dummy_rand_functions[] = { { OSSL_FUNC_RAND_ENABLE_LOCKING, (void(*)(void))dummy_rand_enable_locking }, { OSSL_FUNC_RAND_LOCK, (void(*)(void))dummy_rand_lock }, { OSSL_FUNC_RAND_UNLOCK, (void(*)(void))dummy_rand_unlock }, - { 0, NULL } + OSSL_DISPATCH_END }; static const OSSL_ALGORITHM dummy_rand[] = { @@ -195,7 +195,7 @@ static const OSSL_ALGORITHM *dummy_query(void *provctx, int operation_id, static const OSSL_DISPATCH dummy_dispatch_table[] = { { OSSL_FUNC_PROVIDER_QUERY_OPERATION, (void (*)(void))dummy_query }, { OSSL_FUNC_PROVIDER_TEARDOWN, (void (*)(void))OSSL_LIB_CTX_free }, - { 0, NULL } + OSSL_DISPATCH_END }; static int dummy_provider_init(const OSSL_CORE_HANDLE *handle, diff --git a/test/testutil/fake_random.c b/test/testutil/fake_random.c index f2f0e2793f..ebf3a9d74b 100644 --- a/test/testutil/fake_random.c +++ b/test/testutil/fake_random.c @@ -134,7 +134,7 @@ static const OSSL_DISPATCH fake_rand_functions[] = { { OSSL_FUNC_RAND_GETTABLE_CTX_PARAMS, (void(*)(void))fake_rand_gettable_ctx_params }, { OSSL_FUNC_RAND_GET_CTX_PARAMS, (void(*)(void))fake_rand_get_ctx_params }, - { 0, NULL } + OSSL_DISPATCH_END }; static const OSSL_ALGORITHM fake_rand_rand[] = { @@ -158,7 +158,7 @@ static const OSSL_ALGORITHM *fake_rand_query(void *provctx, static const OSSL_DISPATCH fake_rand_method[] = { { OSSL_FUNC_PROVIDER_TEARDOWN, (void (*)(void))OSSL_LIB_CTX_free }, { OSSL_FUNC_PROVIDER_QUERY_OPERATION, (void (*)(void))fake_rand_query }, - { 0, NULL } + OSSL_DISPATCH_END }; static int fake_rand_provider_init(const OSSL_CORE_HANDLE *handle, diff --git a/test/tls-provider.c b/test/tls-provider.c index 8146b99bb9..a7e897ce95 100644 --- a/test/tls-provider.c +++ b/test/tls-provider.c @@ -538,7 +538,7 @@ static const OSSL_DISPATCH xor_keyexch_functions[] = { { OSSL_FUNC_KEYEXCH_SET_PEER, (void (*)(void))xor_set_peer }, { OSSL_FUNC_KEYEXCH_FREECTX, (void (*)(void))xor_freectx }, { OSSL_FUNC_KEYEXCH_DUPCTX, (void (*)(void))xor_dupctx }, - { 0, NULL } + OSSL_DISPATCH_END }; static const OSSL_ALGORITHM tls_prov_keyexch[] = { @@ -667,7 +667,7 @@ static const OSSL_DISPATCH xor_kem_functions[] = { { OSSL_FUNC_KEM_ENCAPSULATE, (void (*)(void))xor_encapsulate }, { OSSL_FUNC_KEM_DECAPSULATE_INIT, (void (*)(void))xor_init }, { OSSL_FUNC_KEM_DECAPSULATE, (void (*)(void))xor_decapsulate }, - { 0, NULL } + OSSL_DISPATCH_END }; static const OSSL_ALGORITHM tls_prov_kem[] = { @@ -1110,7 +1110,7 @@ static const OSSL_DISPATCH xor_keymgmt_functions[] = { { OSSL_FUNC_KEYMGMT_EXPORT, (void (*)(void))xor_export }, { OSSL_FUNC_KEYMGMT_EXPORT_TYPES, (void (*)(void))xor_export_types }, { OSSL_FUNC_KEYMGMT_EXPORT_TYPES_EX, (void (*)(void))xor_export_types_ex }, - { 0, NULL } + OSSL_DISPATCH_END }; /* We're re-using most XOR keymgmt functions also for signature operations: */ @@ -1164,7 +1164,7 @@ static const OSSL_DISPATCH xor_xorhmacsig_keymgmt_functions[] = { { OSSL_FUNC_KEYMGMT_EXPORT_TYPES, (void (*)(void))xor_export_types }, { OSSL_FUNC_KEYMGMT_LOAD, (void (*)(void))xor_load }, { OSSL_FUNC_KEYMGMT_MATCH, (void (*)(void))xor_match }, - { 0, NULL } + OSSL_DISPATCH_END }; static const OSSL_DISPATCH xor_xorhmacsha2sig_keymgmt_functions[] = { @@ -1188,7 +1188,7 @@ static const OSSL_DISPATCH xor_xorhmacsha2sig_keymgmt_functions[] = { { OSSL_FUNC_KEYMGMT_EXPORT_TYPES, (void (*)(void))xor_export_types }, { OSSL_FUNC_KEYMGMT_LOAD, (void (*)(void))xor_load }, { OSSL_FUNC_KEYMGMT_MATCH, (void (*)(void))xor_match }, - { 0, NULL } + OSSL_DISPATCH_END }; typedef enum { @@ -2009,7 +2009,7 @@ static int key2any_encode(struct key2any_ctx_st *ctx, OSSL_CORE_BIO *cout, (void (*)(void))impl##_to_##kind##_##output##_free_object }, \ { OSSL_FUNC_ENCODER_ENCODE, \ (void (*)(void))impl##_to_##kind##_##output##_encode }, \ - { 0, NULL } \ + OSSL_DISPATCH_END \ } /* @@ -2544,7 +2544,7 @@ static void xorx_key_adjust(void *key, struct der2key_ctx_st *ctx) (void (*)(void))xor_der2key_decode }, \ { OSSL_FUNC_DECODER_EXPORT_OBJECT, \ (void (*)(void))der2key_export_object }, \ - { 0, NULL } \ + OSSL_DISPATCH_END \ } MAKE_DECODER(XORSIGALG_NAME, xorhmacsig, xor, PrivateKeyInfo); @@ -3111,7 +3111,7 @@ static const OSSL_DISPATCH xor_signature_functions[] = { (void (*)(void))xor_sig_set_ctx_md_params }, { OSSL_FUNC_SIGNATURE_SETTABLE_CTX_MD_PARAMS, (void (*)(void))xor_sig_settable_ctx_md_params }, - { 0, NULL } + OSSL_DISPATCH_END }; static const OSSL_ALGORITHM tls_prov_signature[] = { @@ -3169,7 +3169,7 @@ static const OSSL_DISPATCH tls_prov_dispatch_table[] = { { OSSL_FUNC_PROVIDER_TEARDOWN, (void (*)(void))tls_prov_teardown }, { OSSL_FUNC_PROVIDER_QUERY_OPERATION, (void (*)(void))tls_prov_query }, { OSSL_FUNC_PROVIDER_GET_CAPABILITIES, (void (*)(void))tls_prov_get_capabilities }, - { 0, NULL } + OSSL_DISPATCH_END }; static diff --git a/test/upcallstest.c b/test/upcallstest.c index 179931f8ab..096d0b188d 100644 --- a/test/upcallstest.c +++ b/test/upcallstest.c @@ -21,7 +21,7 @@ static const OSSL_ALGORITHM *obj_query(void *provctx, int operation_id, static const OSSL_DISPATCH obj_dispatch_table[] = { { OSSL_FUNC_PROVIDER_QUERY_OPERATION, (void (*)(void))obj_query }, - { 0, NULL } + OSSL_DISPATCH_END }; static OSSL_FUNC_core_obj_add_sigid_fn *c_obj_add_sigid = NULL; diff --git a/test/user_property_test.c b/test/user_property_test.c index 7b7ab62832..a7e7abb051 100644 --- a/test/user_property_test.c +++ b/test/user_property_test.c @@ -45,7 +45,7 @@ static int tmpmd_digest(void *provctx, const unsigned char *in, size_t inl, static const OSSL_DISPATCH testprovmd_functions[] = { { OSSL_FUNC_DIGEST_GET_PARAMS, (void (*)(void))tmpmd_get_params }, { OSSL_FUNC_DIGEST_DIGEST, (void (*)(void))tmpmd_digest }, - { 0, NULL } + OSSL_DISPATCH_END }; static const OSSL_ALGORITHM testprov_digests[] = { @@ -63,7 +63,7 @@ static const OSSL_ALGORITHM *testprov_query(void *provctx, static const OSSL_DISPATCH testprov_dispatch_table[] = { { OSSL_FUNC_PROVIDER_QUERY_OPERATION, (void (*)(void))testprov_query }, - { 0, NULL } + OSSL_DISPATCH_END }; static int testprov_provider_init(const OSSL_CORE_HANDLE *handle, |