diff --git a/doc/man3/OSSL_PARAM_int.pod b/doc/man3/OSSL_PARAM_int.pod index 25b87014b7..4f482ee610 100644 --- a/doc/man3/OSSL_PARAM_int.pod +++ b/doc/man3/OSSL_PARAM_int.pod @@ -7,7 +7,7 @@ OSSL_PARAM_long, OSSL_PARAM_size_t, OSSL_PARAM_time_t, OSSL_PARAM_uint, OSSL_PARAM_uint32, OSSL_PARAM_uint64, OSSL_PARAM_ulong, OSSL_PARAM_BN, OSSL_PARAM_utf8_string, OSSL_PARAM_octet_string, OSSL_PARAM_utf8_ptr, OSSL_PARAM_octet_ptr, -OSSL_PARAM_END, +OSSL_PARAM_END, OSSL_PARAM_DEFN, OSSL_PARAM_construct_double, OSSL_PARAM_construct_int, OSSL_PARAM_construct_int32, OSSL_PARAM_construct_int64, OSSL_PARAM_construct_long, OSSL_PARAM_construct_size_t, @@ -58,6 +58,9 @@ OSSL_PARAM_UNMODIFIED, OSSL_PARAM_modified, OSSL_PARAM_set_all_unmodified #define OSSL_PARAM_UNMODIFIED + #define OSSL_PARAM_DEFN(key, type, addr, sz) \ + { (key), (type), (addr), (sz), OSSL_PARAM_UNMODIFIED } + OSSL_PARAM OSSL_PARAM_construct_TYPE(const char *key, TYPE *buf); OSSL_PARAM OSSL_PARAM_construct_BN(const char *key, unsigned char *buf, size_t bsize); @@ -107,7 +110,7 @@ OSSL_PARAM_UNMODIFIED, OSSL_PARAM_modified, OSSL_PARAM_set_all_unmodified =head1 DESCRIPTION A collection of utility functions that simplify and add type safety to the -OSSL_PARAM arrays. The following B> names are supported: +B arrays. The following B> names are supported: =over 1 @@ -158,7 +161,7 @@ unsigned long int (ulong) =back OSSL_PARAM_TYPE() are a series of macros designed to assist initialising an -array of OSSL_PARAM structures. +array of B structures. Each of these macros defines a parameter of the specified B> with the provided I and parameter variable I
. @@ -169,40 +172,46 @@ A parameter with name I is defined. The storage for this parameter is at I
and is of I bytes. OSSL_PARAM_END provides an end of parameter list marker. -This should terminate all OSSL_PARAM arrays. +This should terminate all B arrays. -OSSL_PARAM_construct_TYPE() are a series of functions that create OSSL_PARAM +The OSSL_PARAM_DEFN() macro provides the ability to construct a single +B (typically used in the construction of B arrays). The +I, I, I and I arguments correspond to the I, +I, I and I fields of the B structure as +described on the L page. + +OSSL_PARAM_construct_TYPE() are a series of functions that create B records dynamically. A parameter with name I is created. The parameter will use storage pointed to by I and return size of I. OSSL_PARAM_construct_BN() is a function that constructs a large integer -OSSL_PARAM structure. +B structure. A parameter with name I, storage I, size I and return size I is created. OSSL_PARAM_construct_utf8_string() is a function that constructs a UTF8 -string OSSL_PARAM structure. +string B structure. A parameter with name I, storage I and size I is created. If I is zero, the string length is determined using strlen(3). Generally pass zero for I instead of calling strlen(3) yourself. OSSL_PARAM_construct_octet_string() is a function that constructs an OCTET -string OSSL_PARAM structure. +string B structure. A parameter with name I, storage I and size I is created. OSSL_PARAM_construct_utf8_ptr() is a function that constructs a UTF string -pointer OSSL_PARAM structure. +pointer B structure. A parameter with name I, storage pointer I<*buf> and size I is created. OSSL_PARAM_construct_octet_ptr() is a function that constructs an OCTET string -pointer OSSL_PARAM structure. +pointer B structure. A parameter with name I, storage pointer I<*buf> and size I is created. OSSL_PARAM_construct_end() is a function that constructs the terminating -OSSL_PARAM structure. +B structure. OSSL_PARAM_locate() is a function that searches an I of parameters for the one matching the I name. @@ -299,10 +308,10 @@ in the array I. OSSL_PARAM_construct_TYPE(), OSSL_PARAM_construct_BN(), OSSL_PARAM_construct_utf8_string(), OSSL_PARAM_construct_octet_string(), OSSL_PARAM_construct_utf8_ptr() and OSSL_PARAM_construct_octet_ptr() -return a populated OSSL_PARAM structure. +return a populated B structure. OSSL_PARAM_locate() and OSSL_PARAM_locate_const() return a pointer to -the matching OSSL_PARAM object. They return NULL on error or when +the matching B object. They return NULL on error or when no object matching I exists in the I. OSSL_PARAM_modified() returns 1 if the parameter was set and 0 otherwise. @@ -326,7 +335,7 @@ possible purposes. =head1 EXAMPLES Reusing the examples from L to just show how -C arrays can be handled using the macros and functions +B arrays can be handled using the macros and functions defined herein. =head2 Example 1 diff --git a/util/missingmacro.txt b/util/missingmacro.txt index 7bdb96c0d4..6b7f9fa2b3 100644 --- a/util/missingmacro.txt +++ b/util/missingmacro.txt @@ -99,7 +99,6 @@ PEM_write_bio_OCSP_REQUEST(3) PEM_write_bio_OCSP_RESPONSE(3) ASN1_BIT_STRING_digest(3) OCSP_CERTSTATUS_dup(3) -OSSL_PARAM_DEFN(3) OSSL_PARAM_SIZED_int(3) OSSL_PARAM_SIZED_uint(3) OSSL_PARAM_SIZED_long(3)