From bae1d405cf08854eb354354c7ea7ff8f5a4865eb Mon Sep 17 00:00:00 2001 From: slontis Date: Mon, 30 May 2022 14:37:53 +1000 Subject: Fix documentation for some i2d return values. 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 Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/18427) (cherry picked from commit 943051d0f9ce8dcb38707774a5757a5dc436704f) --- doc/man3/OSSL_CMP_MSG_get0_header.pod | 7 ++++--- doc/man3/d2i_PrivateKey.pod | 17 +++++++++-------- 2 files changed, 13 insertions(+), 11 deletions(-) (limited to 'doc') diff --git a/doc/man3/OSSL_CMP_MSG_get0_header.pod b/doc/man3/OSSL_CMP_MSG_get0_header.pod index 6fc620f83b..c3297a3577 100644 --- a/doc/man3/OSSL_CMP_MSG_get0_header.pod +++ b/doc/man3/OSSL_CMP_MSG_get0_header.pod @@ -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 diff --git a/doc/man3/d2i_PrivateKey.pod b/doc/man3/d2i_PrivateKey.pod index aac92336c3..fe78d5bc6f 100644 --- a/doc/man3/d2i_PrivateKey.pod +++ b/doc/man3/d2i_PrivateKey.pod @@ -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 structure or NULL -if an error occurs. The error code can be obtained by calling -L. - -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. +and d2i_KeyParams_bio() functions return a valid B structure or NULL if +an error occurs. The error code can be obtained by calling L. + +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. + +i2d_PrivateKey_bio(), i2d_PrivateKey_fp() and i2d_KeyParams_bio() return 1 if +successfully encoded or zero if an error occurs. =head1 SEE ALSO -- cgit v1.2.3