[openssl] master update

Richard Levitte levitte at openssl.org
Tue Aug 17 11:51:16 UTC 2021


The branch master has been updated
       via  43cf27c9a4fe135013dd4127dd4bcf862d1cb503 (commit)
      from  f17e52778f1f7b2703de73e488e7f9229c11dce4 (commit)


- Log -----------------------------------------------------------------
commit 43cf27c9a4fe135013dd4127dd4bcf862d1cb503
Author: Richard Levitte <levitte at openssl.org>
Date:   Mon Aug 16 12:14:30 2021 +0200

    Correct UTF8 params documentation further
    
    The latest change misdocumented OSSL_PARAM_get_utf8_string(), that
    change should have been for OSSL_PARAM_set_utf8_string().
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/16318)

-----------------------------------------------------------------------

Summary of changes:
 doc/man3/OSSL_PARAM_int.pod | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/doc/man3/OSSL_PARAM_int.pod b/doc/man3/OSSL_PARAM_int.pod
index 8dbe830e95..69b723d348 100644
--- a/doc/man3/OSSL_PARAM_int.pod
+++ b/doc/man3/OSSL_PARAM_int.pod
@@ -241,15 +241,20 @@ will be assigned the size the parameter's I<data> buffer should have.
 OSSL_PARAM_get_utf8_string() retrieves a UTF8 string from the parameter
 pointed to by I<p>.
 The string is stored into I<*val> with a size limit of I<max_len>,
-which must be large enough to accomodate the string. A terminating NUL byte
-is added only if the buffer is longer than the string length otherwise the
-string will not be NUL terminated.
+which must be large enough to accomodate a terminating NUL byte,
+otherwise this function will fail.
 If I<*val> is NULL, memory is allocated for the string (including the
 terminating  NUL byte) and I<max_len> is ignored.
 If memory is allocated by this function, it must be freed by the caller.
 
 OSSL_PARAM_set_utf8_string() sets a UTF8 string from the parameter pointed to
 by I<p> to the value referenced by I<val>.
+If the parameter's I<data> field isn't NULL, its I<data_size> must indicate
+that the buffer is large enough to accomodate the string that I<val> points at,
+not including the terminating NUL byte, or this function will fail.
+A terminating NUL byte is added only if the parameter's I<data_size> indicates
+the buffer is longer than the string length, otherwise the string will not be
+NUL terminated.
 If the parameter's I<data> field is NULL, then only its I<return_size> field
 will be assigned the minimum size the parameter's I<data> buffer should have
 to accomodate the string, not including a terminating NUL byte.


More information about the openssl-commits mailing list