From a044af49c43ec8fe099deeb5d06501ddf70abf7a Mon Sep 17 00:00:00 2001 From: "Dr. David von Oheimb" Date: Fri, 18 Feb 2022 09:36:00 +0100 Subject: [PATCH] X509V3_get_d2i.pod: use I<> for arguments and remove B<> around NULL Reviewed-by: Tomas Mraz Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/17724) --- doc/man3/X509V3_get_d2i.pod | 46 ++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/doc/man3/X509V3_get_d2i.pod b/doc/man3/X509V3_get_d2i.pod index 4098f9aa6f30c..a94e92191d3d4 100644 --- a/doc/man3/X509V3_get_d2i.pod +++ b/doc/man3/X509V3_get_d2i.pod @@ -39,37 +39,37 @@ X509_REVOKED_get0_extensions - X509 extension decode and encode functions =head1 DESCRIPTION -X509V3_get_d2i() looks for an extension with OID B in the extensions -B and, if found, decodes it. If B is B then only one +X509V3_get_d2i() looks for an extension with OID I in the extensions +I and, if found, decodes it. If I is NULL then only one occurrence of an extension is permissible otherwise the first extension after -index B<*idx> is returned and B<*idx> updated to the location of the extension. -If B is not B then B<*crit> is set to a status value: -2 if the -extension occurs multiple times (this is only returned if B is B), +index I<*idx> is returned and I<*idx> updated to the location of the extension. +If I is not NULL then I<*crit> is set to a status value: -2 if the +extension occurs multiple times (this is only returned if I is NULL), -1 if the extension could not be found, 0 if the extension is found and is not critical and 1 if critical. A pointer to an extension specific structure -or B is returned. +or NULL is returned. -X509V3_add1_i2d() adds extension B to STACK B<*x> (allocating a new -STACK if necessary) using OID B and criticality B according -to B. +X509V3_add1_i2d() adds extension I to STACK I<*x> (allocating a new +STACK if necessary) using OID I and criticality I according +to I. X509V3_EXT_d2i() attempts to decode the ASN.1 data contained in extension -B and returns a pointer to an extension specific structure or B +I and returns a pointer to an extension specific structure or NULL if the extension could not be decoded (invalid syntax or not supported). -X509V3_EXT_i2d() encodes the extension specific structure B -with OID B and criticality B. +X509V3_EXT_i2d() encodes the extension specific structure I +with OID I and criticality I. X509_get_ext_d2i() and X509_add1_ext_i2d() operate on the extensions of -certificate B, they are otherwise identical to X509V3_get_d2i() and +certificate I, they are otherwise identical to X509V3_get_d2i() and X509V3_add_i2d(). X509_CRL_get_ext_d2i() and X509_CRL_add1_ext_i2d() operate on the extensions -of CRL B, they are otherwise identical to X509V3_get_d2i() and +of CRL I, they are otherwise identical to X509V3_get_d2i() and X509V3_add_i2d(). X509_REVOKED_get_ext_d2i() and X509_REVOKED_add1_ext_i2d() operate on the -extensions of B structure B (i.e for CRL entry extensions), +extensions of B structure I (i.e for CRL entry extensions), they are otherwise identical to X509V3_get_d2i() and X509V3_add_i2d(). X509_get0_extensions(), X509_CRL_get0_extensions() and @@ -79,9 +79,9 @@ of a certificate a CRL or a CRL entry respectively. =head1 NOTES In almost all cases an extension can occur at most once and multiple -occurrences is an error. Therefore, the B parameter is usually B. +occurrences is an error. Therefore, the I parameter is usually NULL. -The B parameter may be one of the following values. +The I parameter may be one of the following values. B appends a new extension only if the extension does not already exist. An error is returned if the extension does already @@ -100,15 +100,15 @@ B appends a new extension only if the extension does not already exist. An error B returned if the extension does already exist. -B extension B is deleted: no new extension is added. +B extension I is deleted: no new extension is added. -If B is ored with B: any error returned will not +If B is ored with I: any error returned will not be added to the error queue. The function X509V3_get_d2i() and its variants -will return B if the extension is not +will return NULL if the extension is not found, occurs multiple times or cannot be decoded. It is possible to -determine the precise reason by checking the value of B<*crit>. +determine the precise reason by checking the value of I<*crit>. =head1 SUPPORTED EXTENSIONS @@ -198,7 +198,7 @@ The following extensions are used by certificate transparency, RFC6962 =head1 RETURN VALUES X509V3_get_d2i(), its variants, and X509V3_EXT_d2i() return -a pointer to an extension specific structure or B if an error occurs. +a pointer to an extension specific structure or NULL if an error occurs. X509V3_add1_i2d() and its variants return 1 if the operation is successful and 0 if it fails due to a non-fatal error (extension not found, already exists, @@ -206,7 +206,7 @@ cannot be encoded) or -1 due to a fatal error such as a memory allocation failure. X509V3_EXT_i2d() returns a pointer to an B structure -or B if an error occurs. +or NULL if an error occurs. X509_get0_extensions(), X509_CRL_get0_extensions() and X509_REVOKED_get0_extensions() return a stack of extensions. They return