From 84a34fc0ac2aee60173093fad7e666f6c83948a9 Mon Sep 17 00:00:00 2001
From: tb <>
Date: Sat, 30 Nov 2024 21:15:19 +0000
Subject: Explain how to free the stack returned by CMS_get1_{certs,crls}()

with job
---
 src/lib/libcrypto/man/CMS_add0_cert.3 | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

(limited to 'src')

diff --git a/src/lib/libcrypto/man/CMS_add0_cert.3 b/src/lib/libcrypto/man/CMS_add0_cert.3
index c5a7367d21..9cfc8ac79f 100644
--- a/src/lib/libcrypto/man/CMS_add0_cert.3
+++ b/src/lib/libcrypto/man/CMS_add0_cert.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: CMS_add0_cert.3,v 1.7 2019/11/02 15:39:46 schwarze Exp $
+.\" $OpenBSD: CMS_add0_cert.3,v 1.8 2024/11/30 21:15:19 tb Exp $
 .\" full merge up to: OpenSSL e9b77246 Jan 20 19:58:49 2017 +0100
 .\"
 .\" This file is a derived work.
@@ -65,7 +65,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
 .\" OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd $Mdocdate: November 2 2019 $
+.Dd $Mdocdate: November 30 2024 $
 .Dt CMS_ADD0_CERT 3
 .Os
 .Sh NAME
@@ -186,6 +186,13 @@ if there are none or an error occurs.
 The only error which will occur in practice is if the
 .Fa cms
 type is invalid.
+The returned stack must be freed using the appropriate
+macro wrapper of
+.Xr sk_pop_free 3 ,
+namely
+.Dv sk_X509_pop_free()
+or
+.Dv sk_X509_CRL_pop_free() .
 .Sh SEE ALSO
 .Xr CMS_ContentInfo_new 3 ,
 .Xr CMS_encrypt 3 ,
-- 
cgit v1.2.3-55-g6feb