summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/man3/OSSL_DISPATCH.pod7
-rw-r--r--doc/man7/provider-base.pod6
-rw-r--r--include/openssl/core.h3
-rw-r--r--util/other.syms1
4 files changed, 11 insertions, 6 deletions
diff --git a/doc/man3/OSSL_DISPATCH.pod b/doc/man3/OSSL_DISPATCH.pod
index 1aca4019dc..52b7f39945 100644
--- a/doc/man3/OSSL_DISPATCH.pod
+++ b/doc/man3/OSSL_DISPATCH.pod
@@ -2,7 +2,7 @@
=head1 NAME
-OSSL_DISPATCH - OpenSSL Core type to define a dispatchable function table
+OSSL_DISPATCH, OSSL_DISPATCH_END - OpenSSL Core type to define a dispatchable function table
=head1 SYNOPSIS
@@ -14,14 +14,15 @@ OSSL_DISPATCH - OpenSSL Core type to define a dispatchable function table
void (*function)(void);
};
+ #define OSSL_DISPATCH_END
+
=head1 DESCRIPTION
This type is a tuple of function identity and function pointer.
Arrays of this type are passed between the OpenSSL libraries and the
providers to describe what functionality one side provides to the other.
-Arrays of this type must be terminated with a tuple having function identity
-zero and function pointer NULL.
+Arrays of this type must be terminated with the OSSL_DISPATCH_END macro.
=head2 B<OSSL_DISPATCH> fields
diff --git a/doc/man7/provider-base.pod b/doc/man7/provider-base.pod
index 4c38edb235..9f50771b38 100644
--- a/doc/man7/provider-base.pod
+++ b/doc/man7/provider-base.pod
@@ -751,7 +751,7 @@ operation C<BAR>.
static const OSSL_ITEM reasons[] = {
{ E_MALLOC, "memory allocation failure" }.
- { 0, NULL } /* Termination */
+ OSSL_DISPATCH_END
};
/*
@@ -831,7 +831,7 @@ operation C<BAR>.
{ OSSL_FUNC_BAR_INIT, (void (*)(void))foo_init },
{ OSSL_FUNC_BAR_UPDATE, (void (*)(void))foo_update },
{ OSSL_FUNC_BAR_FINAL, (void (*)(void))foo_final },
- { 0, NULL }
+ OSSL_DISPATCH_END
};
static const OSSL_ALGORITHM bars[] = {
@@ -863,7 +863,7 @@ operation C<BAR>.
{ OSSL_FUNC_PROVIDER_TEARDOWN, (void (*)(void))p_teardown },
{ OSSL_FUNC_PROVIDER_QUERY_OPERATION, (void (*)(void))p_query },
{ OSSL_FUNC_PROVIDER_GET_REASON_STRINGS, (void (*)(void))p_reasons },
- { 0, NULL }
+ OSSL_DISPATCH_END
};
int OSSL_provider_init(const OSSL_CORE_HANDLE *handle,
diff --git a/include/openssl/core.h b/include/openssl/core.h
index 9683ac70a5..b35392656c 100644
--- a/include/openssl/core.h
+++ b/include/openssl/core.h
@@ -42,6 +42,9 @@ struct ossl_dispatch_st {
void (*function)(void);
};
+# define OSSL_DISPATCH_END \
+ { 0, NULL }
+
/*
* Other items, essentially an int<->pointer map element.
*
diff --git a/util/other.syms b/util/other.syms
index 91a1559b5d..daa3be067f 100644
--- a/util/other.syms
+++ b/util/other.syms
@@ -468,6 +468,7 @@ OSSL_PARAM_construct_TYPE generic
OSSL_PARAM_utf8_string define
OSSL_PARAM_get_TYPE generic
OSSL_PARAM_END define
+OSSL_DISPATCH_END define
OSSL_PARAM_set_TYPE generic
OSSL_ENCODER_PUBKEY_TO_DER_PQ define
OSSL_ENCODER_PrivateKey_TO_DER_PQ define