summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorIrak Rigia <tarakrigia@gmail.com>2023-04-19 19:36:29 +0530
committerTomas Mraz <tomas@openssl.org>2023-04-21 16:16:14 +0200
commit23e648962e04af132c0841bec950b8a89b87fb2d (patch)
tree13102801b78961293a7d4a5b20958fef193e190b /doc
parent4e5f3d691343a691ddae739c51f7ae71e9893c98 (diff)
downloadopenssl-new-23e648962e04af132c0841bec950b8a89b87fb2d.tar.gz
Added a macro OSSL_DISPATCH_END as marker of the end of OSSL_DISPATCH arrays
Also updated the corresponding documentations. 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 'doc')
-rw-r--r--doc/man3/OSSL_DISPATCH.pod7
-rw-r--r--doc/man7/provider-base.pod6
2 files changed, 7 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,