From: Richard Levitte Date: Fri, 1 Nov 2019 21:58:27 +0000 (+0100) Subject: doc/man3/OSSL_PARAM.pod: Clarify return_size with integer types X-Git-Tag: openssl-3.0.0-alpha1~1043 X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff_plain;h=909ef4de3187b752710b7ae69b6df5df51251600 doc/man3/OSSL_PARAM.pod: Clarify return_size with integer types Reviewed-by: Patrick Steuer (Merged from https://github.com/openssl/openssl/pull/10326) --- diff --git a/doc/man3/OSSL_PARAM.pod b/doc/man3/OSSL_PARAM.pod index df532b4264..cd7d41006b 100644 --- a/doc/man3/OSSL_PARAM.pod +++ b/doc/man3/OSSL_PARAM.pod @@ -100,10 +100,12 @@ accepted, otherwise it specifies the maximum size allowed. =item I When an array of B is used to request data, the -I must set this field to indicate the actual size of the -parameter data. -In case the I is too small for the data, the I -must still set this field to indicate the minimum data size required. +I must set this field to indicate size of the parameter +data, including padding as the case may be. +In case the I is an unsuitable size for the data, the +I must still set this field to indicate the minimum data +size required. +(further notes on this in L below). When the B is used as a parameter descriptor, I should be ignored. @@ -238,8 +240,18 @@ B), but this is in no way mandatory. If a I finds that some data sizes are too small for the requested data, it must set I for each such -B item to the required size, and eventually return an -error. +B item to the minimum required size, and eventually return +an error. + +=item * + +For the integer type parameters (B and +B), a I may choose to return an error +if the I isn't a suitable size (even if I is +bigger than needed). If the I finds the size suitable, it +must fill all I bytes and ensure correct padding for the +native endianness, and set I to the same value as +I. =back