From d4d28783473e5b4417068258f2553896ff618600 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Thu, 26 Sep 2019 07:42:06 +0200 Subject: [PATCH] OSSL_PARAM.pod: document the mechanism to figure out buffer sizes When requesting parameters, it's acceptable to make a first pass with the |data| field of some parameters being NULL. That can be used to help the requestor to figure out dynamically what buffer size is needed. For variable size parameters, there's no other way to find out. Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/10025) --- doc/man3/OSSL_PARAM.pod | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/man3/OSSL_PARAM.pod b/doc/man3/OSSL_PARAM.pod index 361028fa00..df532b4264 100644 --- a/doc/man3/OSSL_PARAM.pod +++ b/doc/man3/OSSL_PARAM.pod @@ -87,6 +87,11 @@ setting parameters) or shall (when requesting parameters) be stored, and I is its size in bytes. The organization of the data depends on the parameter type and flag. +When I, it's acceptable for I to be NULL. +This can be used by the I to figure out dynamically exactly +how much buffer space is needed to store the parameter data. +In this case, I is ignored. + When the B is used as a parameter descriptor, I should be ignored. If I is zero, it means that an arbitrary data size is -- 2.25.1