From 338abf105cb95b58b2ccc1897abf4296913bf64b Mon Sep 17 00:00:00 2001 From: schwarze <> Date: Sun, 25 Feb 2018 10:07:34 +0000 Subject: Correct the description of ASN1_item_free(3) with respect to optional reference counting. ETOOMUCHMAGIC. By the way, this public hellhole is still undocumented in OpenSSL. --- src/lib/libcrypto/man/ASN1_item_new.3 | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/lib/libcrypto/man/ASN1_item_new.3 b/src/lib/libcrypto/man/ASN1_item_new.3 index e679815751..ea7cb5f405 100644 --- a/src/lib/libcrypto/man/ASN1_item_new.3 +++ b/src/lib/libcrypto/man/ASN1_item_new.3 @@ -1,6 +1,6 @@ -.\" $OpenBSD: ASN1_item_new.3,v 1.2 2017/01/03 20:15:47 schwarze Exp $ +.\" $OpenBSD: ASN1_item_new.3,v 1.3 2018/02/25 10:07:34 schwarze Exp $ .\" -.\" Copyright (c) 2016 Ingo Schwarze +.\" Copyright (c) 2016, 2018 Ingo Schwarze .\" .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: January 3 2017 $ +.Dd $Mdocdate: February 25 2018 $ .Dt ASN1_ITEM_NEW 3 .Os .Sh NAME @@ -38,8 +38,17 @@ allocates and initializes an empty ASN.1 value of the type described by the global static object .Fa it . .Pp +If the item type described by +.Fa it +is reference counted, +.Fn ASN1_item_free +decrements the reference count of +.Fa val_in . +Otherwise, or if the reference count reaches 0, .Fn ASN1_item_free -frees an ASN.1 value of the type described by +frees +.Fa val_in , +assuming that it is of the type described by .Fa it . If the true type of .Fa val_in -- cgit v1.2.3-55-g6feb