summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2022-01-07 17:30:39 +0000
committerPauli <pauli@openssl.org>2022-01-12 10:14:57 +1100
commit408ba1775a82bad57f2e1a4bb4078e4b82cef10b (patch)
treed6b169fa4a5773c2c241adccf20bd0f37a702d19
parent576cc3ecb34a8909bf549798430de95fc0fb4042 (diff)
Clarify the int param getter documentation
OSSL_PARAMs that are of type OSSL_PARAM_INTEGER or OSSL_PARAM_UNSIGNED_INTEGER can be obtained using any of the functions EVP_PKEY_get_int_param(), EVP_PKEY_get_size_t_param() or EVP_PKEY_get_bn_param(). The former two will fail if the parameter is too large to fit into the C variable. We clarify this in the documentation. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17445) (cherry picked from commit 254217a4a0c9e64869495447a0e6bdc2323d4cd1)
-rw-r--r--doc/man3/EVP_PKEY_gettable_params.pod9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/man3/EVP_PKEY_gettable_params.pod b/doc/man3/EVP_PKEY_gettable_params.pod
index 23ac4bd8b0..29b8ec822b 100644
--- a/doc/man3/EVP_PKEY_gettable_params.pod
+++ b/doc/man3/EVP_PKEY_gettable_params.pod
@@ -37,6 +37,15 @@ EVP_PKEY_gettable_params() returns a constant list of I<params> indicating
the names and types of key parameters that can be retrieved.
See L<OSSL_PARAM(3)> for information about parameters.
+An B<OSSL_PARAM> of type B<OSSL_PARAM_INTEGER> or
+B<OSSL_PARAM_UNSIGNED_INTEGER> is of arbitrary length. Such a parameter can be
+obtained using any of the functions EVP_PKEY_get_int_param(),
+EVP_PKEY_get_size_t_param() or EVP_PKEY_get_bn_param(). Attempting to
+obtain an integer value that does not fit into a native C B<int> type will cause
+EVP_PKEY_get_int_param() to fail. Similarly attempting to obtain an integer
+value that is negative or does not fit into a native C B<size_t> type using
+EVP_PKEY_get_size_t_param() will also fail.
+
EVP_PKEY_get_int_param() retrieves a key I<pkey> integer value I<*out>
associated with a name of I<key_name>.