From 9356f541b67227ea6151e93d440b571f4788ff08 Mon Sep 17 00:00:00 2001 From: schwarze <> Date: Wed, 11 Jun 2025 14:23:14 +0000 Subject: Lie less below RETURN VALUES, add a related BUGS entry, and since SMIME_write_ASN1(3) is no longer public, replace the .Xr to it with some other pointers. OK tb@ --- src/lib/libcrypto/man/SMIME_write_CMS.3 | 16 ++++++++++++---- src/lib/libcrypto/man/SMIME_write_PKCS7.3 | 18 ++++++++++++------ 2 files changed, 24 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/lib/libcrypto/man/SMIME_write_CMS.3 b/src/lib/libcrypto/man/SMIME_write_CMS.3 index 548363693d..1a691fc29a 100644 --- a/src/lib/libcrypto/man/SMIME_write_CMS.3 +++ b/src/lib/libcrypto/man/SMIME_write_CMS.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: SMIME_write_CMS.3,v 1.7 2025/06/08 22:40:30 schwarze Exp $ +.\" $OpenBSD: SMIME_write_CMS.3,v 1.8 2025/06/11 14:23:14 schwarze Exp $ .\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 .\" .\" This file was written by Dr. Stephen Henson . @@ -48,7 +48,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED .\" OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: June 8 2025 $ +.Dd $Mdocdate: June 11 2025 $ .Dt SMIME_WRITE_CMS 3 .Os .Sh NAME @@ -115,14 +115,18 @@ used. .El .Sh RETURN VALUES .Fn SMIME_write_CMS -returns 1 for success or 0 for failure. +is intended to return 1 on success or 0 on failure. .Sh SEE ALSO +.Xr BIO_f_base64 3 , +.Xr BIO_new 3 , .Xr CMS_ContentInfo_new 3 , .Xr CMS_encrypt 3 , .Xr CMS_sign 3 , .Xr d2i_CMS_ContentInfo 3 , .Xr ERR_get_error 3 , -.Xr SMIME_write_ASN1 3 +.Xr SMIME_crlf_copy 3 , +.Xr SMIME_read_CMS 3 , +.Xr SMIME_write_PKCS7 3 .Sh HISTORY .Fn SMIME_write_CMS first appeared in OpenSSL 0.9.8h @@ -130,5 +134,9 @@ and has been available since .Ox 6.7 . .Sh BUGS .Fn SMIME_write_CMS +ignores most errors and is likely to return 1 +even after producing corrupt or incomplete output. +.Pp +.Fn SMIME_write_CMS always base64 encodes CMS structures. There should be an option to disable this. diff --git a/src/lib/libcrypto/man/SMIME_write_PKCS7.3 b/src/lib/libcrypto/man/SMIME_write_PKCS7.3 index e4c482a983..72200c0b1b 100644 --- a/src/lib/libcrypto/man/SMIME_write_PKCS7.3 +++ b/src/lib/libcrypto/man/SMIME_write_PKCS7.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: SMIME_write_PKCS7.3,v 1.10 2025/06/08 22:40:30 schwarze Exp $ +.\" $OpenBSD: SMIME_write_PKCS7.3,v 1.11 2025/06/11 14:23:14 schwarze Exp $ .\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 .\" .\" This file is a derived work. @@ -66,7 +66,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED .\" OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: June 8 2025 $ +.Dd $Mdocdate: June 11 2025 $ .Dt SMIME_WRITE_PKCS7 3 .Os .Sh NAME @@ -164,22 +164,28 @@ indefinite length constructed encoding except in the case of signed data with detached content where the content is absent and DER format is used. .Sh RETURN VALUES -Upon successful completion, 1 is returned; -otherwise 0 is returned and an error code can be retrieved with -.Xr ERR_get_error 3 . +.Fn SMIME_write_PKCS7 +is intended to return 1 on success or 0 on failure. .Sh SEE ALSO +.Xr BIO_f_base64 3 , +.Xr BIO_new 3 , .Xr i2d_PKCS7_bio_stream 3 , .Xr PEM_write_bio_PKCS7_stream 3 , .Xr PEM_write_PKCS7 3 , .Xr PKCS7_final 3 , .Xr PKCS7_new 3 , +.Xr SMIME_crlf_copy 3 , .Xr SMIME_read_PKCS7 3 , -.Xr SMIME_write_ASN1 3 +.Xr SMIME_write_CMS 3 .Sh HISTORY .Fn SMIME_write_PKCS7 first appeared in OpenSSL 0.9.5 and has been available since .Ox 2.7 . .Sh BUGS .Fn SMIME_write_PKCS7 +ignores most errors and is likely to return 1 +even after producing corrupt or incomplete output. +.Pp +.Fn SMIME_write_PKCS7 always base64 encodes PKCS#7 structures. There should be an option to disable this. -- cgit v1.2.3-55-g6feb