Skip to content

Commit

Permalink
Fix documentation for some i2d return values.
Browse files Browse the repository at this point in the history
i2d_XXX_bio and i2d_XXX_fp return either 0 or 1.
Other i2d_XXX functions return the number of bytes or negative on error.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #18427)

(cherry picked from commit 943051d)
  • Loading branch information
slontis authored and t8m committed Nov 7, 2022
1 parent 42e1a64 commit bae1d40
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
7 changes: 4 additions & 3 deletions doc/man3/OSSL_CMP_MSG_get0_header.pod
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,11 @@ d2i_OSSL_CMP_MSG_bio() returns the parsed message or NULL on error.
OSSL_CMP_MSG_read() and d2i_OSSL_CMP_MSG_bio()
return the parsed CMP message or NULL on error.

OSSL_CMP_MSG_write() and i2d_OSSL_CMP_MSG_bio() return
the number of bytes successfully encoded or a negative value if an error occurs.
OSSL_CMP_MSG_write() returns the number of bytes successfully encoded or a
negative value if an error occurs.

OSSL_CMP_MSG_update_transactionID() returns 1 on success, 0 on error.
i2d_OSSL_CMP_MSG_bio() and OSSL_CMP_MSG_update_transactionID() return 1 on
success, 0 on error.

=head1 SEE ALSO

Expand Down
17 changes: 9 additions & 8 deletions doc/man3/d2i_PrivateKey.pod
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,15 @@ EC_GROUP.
The d2i_PrivateKey_ex(), d2i_PrivateKey(), d2i_AutoPrivateKey_ex(),
d2i_AutoPrivateKey(), d2i_PrivateKey_ex_bio(), d2i_PrivateKey_bio(),
d2i_PrivateKey_ex_fp(), d2i_PrivateKey_fp(), d2i_PublicKey(), d2i_KeyParams()
and d2i_KeyParams_bio() functions return a valid B<EVP_PKEY> structure or NULL
if an error occurs. The error code can be obtained by calling
L<ERR_get_error(3)>.

i2d_PrivateKey(), i2d_PrivateKey_bio(), i2d_PrivateKey_fp(), i2d_PublicKey(),
i2d_KeyParams() i2d_KeyParams_bio() return the number of bytes successfully
encoded or a negative value if an error occurs. The error code can be obtained
by calling L<ERR_get_error(3)>.
and d2i_KeyParams_bio() functions return a valid B<EVP_PKEY> structure or NULL if
an error occurs. The error code can be obtained by calling L<ERR_get_error(3)>.

i2d_PrivateKey(), i2d_PublicKey() and i2d_KeyParams() return the number of
bytes successfully encoded or a negative value if an error occurs. The error
code can be obtained by calling L<ERR_get_error(3)>.

i2d_PrivateKey_bio(), i2d_PrivateKey_fp() and i2d_KeyParams_bio() return 1 if
successfully encoded or zero if an error occurs.

=head1 SEE ALSO

Expand Down

0 comments on commit bae1d40

Please sign in to comment.