From: Pauli Date: Tue, 23 Feb 2021 01:03:31 +0000 (+1000) Subject: doc: changes to match the updated context gettable/settable calls for MACs X-Git-Tag: openssl-3.0.0-alpha13~162 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8dd233bb07607239bea31f33224df2ac37eddb57;p=thirdparty%2Fopenssl.git doc: changes to match the updated context gettable/settable calls for MACs Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/14240) --- diff --git a/doc/man3/EVP_MAC.pod b/doc/man3/EVP_MAC.pod index ff7003b9068..b32415aac5c 100644 --- a/doc/man3/EVP_MAC.pod +++ b/doc/man3/EVP_MAC.pod @@ -9,6 +9,7 @@ EVP_MAC_CTX, EVP_MAC_CTX_new, EVP_MAC_CTX_free, EVP_MAC_CTX_dup, EVP_MAC_CTX_mac, EVP_MAC_CTX_get_params, EVP_MAC_CTX_set_params, EVP_MAC_CTX_get_mac_size, EVP_MAC_init, EVP_MAC_update, EVP_MAC_final, EVP_MAC_gettable_ctx_params, EVP_MAC_settable_ctx_params, +EVP_MAC_CTX_gettable_params, EVP_MAC_CTX_settable_params, EVP_MAC_do_all_provided - EVP MAC routines =head1 SYNOPSIS @@ -47,6 +48,8 @@ EVP_MAC_do_all_provided - EVP MAC routines const OSSL_PARAM *EVP_MAC_gettable_params(const EVP_MAC *mac); const OSSL_PARAM *EVP_MAC_gettable_ctx_params(const EVP_MAC *mac); const OSSL_PARAM *EVP_MAC_settable_ctx_params(const EVP_MAC *mac); + const OSSL_PARAM *EVP_MAC_CTX_gettable_params(EVP_MAC_CTX *ctx); + const OSSL_PARAM *EVP_MAC_CTX_settable_params(EVP_MAC_CTX *ctx); void EVP_MAC_do_all_provided(OSSL_LIB_CTX *libctx, void (*fn)(EVP_MAC *mac, void *arg), @@ -153,12 +156,26 @@ simply ignored. Also, what happens when a needed parameter isn't passed down is defined by the implementation. -EVP_MAC_gettable_params(), EVP_MAC_gettable_ctx_params() and -EVP_MAC_settable_ctx_params() get a constant B array that -describes the retrievable and settable parameters, i.e. parameters that -can be used with EVP_MAC_get_params(), EVP_MAC_CTX_get_params() -and EVP_MAC_CTX_set_params(), respectively. -See L for the use of B as parameter descriptor. +EVP_MAC_gettable_params() returns an B array that describes +the retrievable and settable parameters. EVP_MAC_gettable_params() +returns parameters that can be used with EVP_MAC_get_params(). +See L for the use of B as a parameter descriptor. + +EVP_MAC_gettable_ctx_params() and EVP_MAC_CTX_gettable_params() +return constant B arrays that describe the retrievable +parameters that can be used with EVP_MAC_CTX_get_params(). +EVP_MAC_gettable_ctx_params() returns the parameters that can be retrieved +from the algorithm, whereas EVP_MAC_CTX_gettable_params() returns +the parameters that can be retrieved in the context's current state. +See L for the use of B as a parameter descriptor. + +EVP_MAC_settable_ctx_params() and EVP_MAC_CTX_settable_params() return +constant B arrays that describe the settable parameters that +can be used with EVP_MAC_CTX_set_params(). EVP_MAC_settable_ctx_params() +returns the parameters that can be retrieved from the algorithm, +whereas EVP_MAC_CTX_settable_params() returns the parameters that can +be retrieved in the context's current state. See L +for the use of B as a parameter descriptor. =head2 Information functions diff --git a/doc/man7/provider-mac.pod b/doc/man7/provider-mac.pod index 7ce2ad2a13c..fdeda79ab5e 100644 --- a/doc/man7/provider-mac.pod +++ b/doc/man7/provider-mac.pod @@ -28,9 +28,9 @@ provider-mac - The mac library E-E provider functions int OSSL_FUNC_mac_final(void *mctx, unsigned char *out, size_t *outl, size_t outsize); /* MAC parameter descriptors */ - const OSSL_PARAM *OSSL_FUNC_mac_get_params(void *provctx); - const OSSL_PARAM *OSSL_FUNC_mac_get_ctx_params(void *provctx); - const OSSL_PARAM *OSSL_FUNC_mac_set_ctx_params(void *provctx); + const OSSL_PARAM *OSSL_FUNC_mac_gettable_params(void *provctx); + const OSSL_PARAM *OSSL_FUNC_mac_gettable_ctx_params(void *mctx, void *provctx); + const OSSL_PARAM *OSSL_FUNC_mac_settable_ctx_params(void *mctx, void *provctx); /* MAC parameters */ int OSSL_FUNC_mac_get_params(OSSL_PARAM params[]); @@ -140,11 +140,16 @@ OSSL_FUNC_mac_get_ctx_params() gets details of currently set parameter values associated with the given provider side mac context I and stores them in I. -OSSL_FUNC_mac_gettable_params(), OSSL_FUNC_mac_gettable_ctx_params(), and -OSSL_FUNC_mac_settable_ctx_params() all return constant B arrays -as descriptors of the parameters that OSSL_FUNC_mac_get_params(), -OSSL_FUNC_mac_get_ctx_params(), and OSSL_FUNC_mac_set_ctx_params() can handle, -respectively. +OSSL_FUNC_mac_gettable_params(), OSSL_FUNC_mac_gettable_ctx_params(), +and OSSL_FUNC_mac_settable_ctx_params() all return constant B +arrays as descriptors of the parameters that OSSL_FUNC_mac_get_params(), +OSSL_FUNC_mac_get_ctx_params(), and OSSL_FUNC_mac_set_ctx_params() +can handle, respectively. OSSL_FUNC_mac_gettable_ctx_params() and +OSSL_FUNC_mac_settable_ctx_params() will return the parameters associated +with the provider side context I in its current state if it is +not NULL. Otherwise, they return the parameters associated with the +provider side algorithm I. + Parameters currently recognised by built-in macs are as follows. Not all parameters are relevant to, or are understood by all macs: