summaryrefslogtreecommitdiffstats
path: root/doc/man3/OSSL_PARAM_BLD.pod
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2021-08-11 18:46:07 +0200
committerTomas Mraz <tomas@openssl.org>2021-08-13 12:28:10 +0200
commit4ccad35756dfa9df657f3853810101fa9d6ca525 (patch)
tree6a83ff243dd6a351761f1e883a821be7d709375d /doc/man3/OSSL_PARAM_BLD.pod
parentbd32bdb8b2a0f98d99b21e1b4d68dfaf1bd5584d (diff)
Correct documentation errors in regards to UTF8 params
This fixes numerous bugs in documentation in regards to UTF8 params and their sizes. The returned size should always be without the terminating NUL byte. On the other hand on the requestor side the size of the buffer should include the NUL byte if it expects it being included in the returned string. Also make this clear in the EVP_PKEY_get_group_name() documentation which uses utf8 string params under the hood. Fixes #16287 Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16296)
Diffstat (limited to 'doc/man3/OSSL_PARAM_BLD.pod')
-rw-r--r--doc/man3/OSSL_PARAM_BLD.pod6
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/man3/OSSL_PARAM_BLD.pod b/doc/man3/OSSL_PARAM_BLD.pod
index fdc9ec3081..d07eff6f27 100644
--- a/doc/man3/OSSL_PARAM_BLD.pod
+++ b/doc/man3/OSSL_PARAM_BLD.pod
@@ -91,7 +91,8 @@ must exist until after OSSL_PARAM_BLD_to_param() has been called.
OSSL_PARAM_BLD_push_utf8_string() is a function that will create an OSSL_PARAM
object that references the UTF8 string specified by I<buf>.
-If the length of the string, I<bsize>, is zero then it will be calculated.
+The length of the string I<bsize> should not include the terminating NUL byte.
+If it is zero then it will be calculated.
The string that I<buf> points to is stored by reference and must remain in
scope until after OSSL_PARAM_BLD_to_param() has been called.
@@ -102,7 +103,8 @@ scope until after OSSL_PARAM_BLD_to_param() has been called.
OSSL_PARAM_BLD_push_utf8_ptr() is a function that will create an OSSL_PARAM
object that references the UTF8 string specified by I<buf>.
-If the length of the string, I<bsize>, is zero then it will be calculated.
+The length of the string I<bsize> should not include the terminating NUL byte.
+If it is zero then it will be calculated.
The string I<buf> points to is stored by reference and must remain in
scope until the OSSL_PARAM array is freed.