From d3ed4ded298f169fe5d29d43c5db8da7cd95d2b0 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Sat, 31 Aug 2019 09:29:33 +0200 Subject: [PATCH] doc/man3/OSSL_PARAM.pod: conform to man-page standards Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/9741) --- doc/man3/OSSL_PARAM.pod | 100 ++++++++++++++++++++-------------------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/doc/man3/OSSL_PARAM.pod b/doc/man3/OSSL_PARAM.pod index 61ff378e46..30316d5184 100644 --- a/doc/man3/OSSL_PARAM.pod +++ b/doc/man3/OSSL_PARAM.pod @@ -19,7 +19,7 @@ OSSL_PARAM - a structure to pass or request object parameters =head1 DESCRIPTION -C is a type that allows passing arbitrary data for some +B is a type that allows passing arbitrary data for some object between two parties that have no or very little shared knowledge about their respective internal structures for that object. @@ -33,76 +33,76 @@ Arrays of this type can be used for the following purposes: =item * Setting parameters for some object -The caller sets up the C array and calls some function +The caller sets up the B array and calls some function (the I) that has intimate knowledge about the object that can -take the data from the C array and assign them in a +take the data from the B array and assign them in a suitable form for the internal structure of the object. =item * Request parameters of some object -The caller (the I) sets up the C array and +The caller (the I) sets up the B array and calls some function (the I) that has intimate knowledge about the object, which can take the internal data of the object and copy (possibly convert) that to the memory prepared by the -I and pointed at with the C C. +I and pointed at with the B I. =item * Request parameter descriptors -The caller gets an array of constant C, which describe +The caller gets an array of constant B, which describe available parameters and some of their properties; name, data type and expected data size. For a detailed description of each field for this use, see the field descriptions below. The caller may then use the information from this descriptor array to -build up its own C array to pass down to a I or +build up its own B array to pass down to a I or I. =back -=head2 C fields +=head2 B fields =over 4 -=item C +=item I The identity of the parameter in the form of a string. -=item C +=item I =for comment It's still debated if this field should be present, or if the type should always be implied by how it's used. Either way, these data types will have to be passed together with the names as an array of OSSL_ITEM, for discovery purposes. -The C is a value that describes the type and organization of +The I is a value that describes the type and organization of the data. See L below for a description of the types. -=item C +=item I -=item C +=item I -C is a pointer to the memory where the parameter data is (when +I is a pointer to the memory where the parameter data is (when setting parameters) or shall (when requesting parameters) be stored, -and C is its size in bytes. +and I is its size in bytes. The organization of the data depends on the parameter type and flag. -When the C is used as a parameter descriptor, C +When the B is used as a parameter descriptor, I should be ignored. -If C is zero, it means that an arbitrary data size is +If I is zero, it means that an arbitrary data size is accepted, otherwise it specifies the maximum size allowed. -=item C +=item I -When an array of C is used to request data, the +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 C is too small for the data, the I +In case the I is too small for the data, the I must still set this field to indicate the minimum data size required. -When the C is used as a parameter descriptor, -C should be ignored. +When the B is used as a parameter descriptor, +I should be ignored. =back @@ -116,75 +116,75 @@ except for the pointer form of strings (see data type descriptions below). Entities that want to set or request parameters need to know what those keys are and of what type, any functionality between those two -entities should remain oblivious and just pass the C array +entities should remain oblivious and just pass the B array along. =head2 Supported types -The C field can be one of the following types: +The I field can be one of the following types: =over 4 -=item C +=item B -=item C +=item B The parameter data is an integer (signed or unsigned) of arbitrary length, organized in native form, i.e. most significant byte first on Big-Endian systems, and least significant byte first on Little-Endian systems. -=item C +=item B The parameter data is a floating point value in native form. -=item C +=item B The parameter data is a printable string. -=item C +=item B The parameter data is an arbitrary string of bytes. -=item C +=item B The parameter data is a pointer to a printable string. -The difference between this and C is that C +The difference between this and B is that I doesn't point directly at the data, but to a pointer that points to the data. This is used to indicate that constant data is or will be passed, and there is therefore no need to copy the data that is passed, just the pointer to it. -C must be set to the size of the data, not the size of the +I must be set to the size of the data, not the size of the pointer to the data. If this is used in a parameter request, -C is not relevant. However, the I will set -C to the size of the data. +I is not relevant. However, the I will set +I to the size of the data. Note that the use of this type is B and can only be safely used for data that remains constant and in a constant location for a long enough duration (such as the life-time of the entity that offers these parameters). -=item C +=item B The parameter data is a pointer to an arbitrary string of bytes. -The difference between this and C is that -C doesn't point directly at the data, but to a pointer that +The difference between this and B is that +I doesn't point directly at the data, but to a pointer that points to the data. This is used to indicate that constant data is or will be passed, and there is therefore no need to copy the data that is passed, just the pointer to it. -C must be set to the size of the data, not the size of the +I must be set to the size of the data, not the size of the pointer to the data. If this is used in a parameter request, -C is not relevant. However, the I will set -C to the size of the data. +I is not relevant. However, the I will set +I to the size of the data. Note that the use of this type is B and can only be safely used for data that remains constant and in a constant location for a @@ -214,10 +214,10 @@ enough set of data, that call should succeed. =item * -Apart from the C, a I must never change the fields -of an C. +Apart from the I, a I must never change the fields +of an B. To return a value, it should change the contents of the memory that -C points at. +I points at. =item * @@ -227,14 +227,14 @@ the called function may return an error. The called function may also try to convert the data to a suitable form (for example, it's plausible to pass a large number as an octet string, so even though a given key is defined as an -C, is plausible to pass the value as an -C), but this is in no way mandatory. +B, is plausible to pass the value as an +B), but this is in no way mandatory. =item * If a I finds that some data sizes are too small for the -requested data, it must set C for each such -C item to the required size, and eventually return an +requested data, it must set I for each such +B item to the required size, and eventually return an error. =back @@ -251,7 +251,7 @@ txt =head1 EXAMPLES -A couple of examples to just show how C arrays could be +A couple of examples to just show how B arrays could be set up. =head3 Example 1 @@ -283,7 +283,7 @@ This example is for requesting parameters on some object: { NULL, 0, NULL, 0, NULL } }; -A I that receives this array (as C in this example) +A I that receives this array (as I in this example) could fill in the parameters like this: /* OSSL_PARAM *params */ @@ -307,7 +307,7 @@ L, L =head1 HISTORY -C was added in OpenSSL 3.0. +B was added in OpenSSL 3.0. =head1 COPYRIGHT -- 2.25.1