Skip to content

Commit

Permalink
X509V3_get_d2i.pod: Fix glitch on X509V3_get{,_ext}_d2i and align order
Browse files Browse the repository at this point in the history
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from openssl#17724)
  • Loading branch information
DDvO committed Feb 22, 2022
1 parent cd7ec0b commit 2455a21
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions doc/man3/X509V3_get_d2i.pod
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

=head1 NAME

X509_get0_extensions, X509_CRL_get0_extensions, X509_REVOKED_get0_extensions,
X509V3_get_d2i, X509V3_add1_i2d, X509V3_EXT_d2i, X509V3_EXT_i2d,
X509_get_ext_d2i, X509_add1_ext_i2d, X509_CRL_get_ext_d2i,
X509_CRL_add1_ext_i2d, X509_REVOKED_get_ext_d2i,
X509_REVOKED_add1_ext_i2d - X509 extension decode and encode functions
X509_get_ext_d2i, X509_add1_ext_i2d,
X509_CRL_get_ext_d2i, X509_CRL_add1_ext_i2d,
X509_REVOKED_get_ext_d2i, X509_REVOKED_add1_ext_i2d,
X509_get0_extensions, X509_CRL_get0_extensions,
X509_REVOKED_get0_extensions - X509 extension decode and encode functions

=head1 SYNOPSIS

Expand Down Expand Up @@ -38,7 +39,7 @@ X509_REVOKED_add1_ext_i2d - X509 extension decode and encode functions

=head1 DESCRIPTION

X509V3_get_ext_d2i() looks for an extension with OID B<nid> in the extensions
X509V3_get_d2i() looks for an extension with OID B<nid> in the extensions
B<x> and, if found, decodes it. If B<idx> is B<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.
Expand Down Expand Up @@ -104,7 +105,8 @@ B<X509V3_ADD_DELETE> extension B<nid> is deleted: no new extension is added.
If B<X509V3_ADD_SILENT> is ored with B<flags>: any error returned will not
be added to the error queue.

The function X509V3_get_d2i() will return B<NULL> if the extension is not
The function X509V3_get_d2i() and its variants
will return B<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>.

Expand Down Expand Up @@ -195,17 +197,17 @@ The following extensions are used by certificate transparency, RFC6962

=head1 RETURN VALUES

X509V3_EXT_d2i() and *X509V3_get_d2i() return a pointer to an extension
specific structure or B<NULL> if an error occurs.
X509V3_get_d2i(), its variants, and X509V3_EXT_d2i() return
a pointer to an extension specific structure or B<NULL> if an error occurs.

X509V3_EXT_i2d() returns a pointer to an B<X509_EXTENSION> structure
or B<NULL> if an error occurs.

X509V3_add1_i2d() returns 1 if the operation is successful and 0 if it
fails due to a non-fatal error (extension not found, already exists,
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,
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<X509_EXTENSION> structure
or B<NULL> if an error occurs.

X509_get0_extensions(), X509_CRL_get0_extensions() and
X509_REVOKED_get0_extensions() return a stack of extensions. They return
NULL if no extensions are present.
Expand Down

0 comments on commit 2455a21

Please sign in to comment.