summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2024-01-13 19:06:20 +0000
committertb <>2024-01-13 19:06:20 +0000
commite813b47beeda7c1bd4dfbe3de4469807858cd579 (patch)
tree667e37e173e3d321835fddcd6e5d70cdf234b745 /src
parent2fb37ea64aefe52a293499061e097d6a2e21c886 (diff)
downloadopenbsd-e813b47beeda7c1bd4dfbe3de4469807858cd579.tar.gz
openbsd-e813b47beeda7c1bd4dfbe3de4469807858cd579.tar.bz2
openbsd-e813b47beeda7c1bd4dfbe3de4469807858cd579.zip
Remove check{,obj_cleanup}_defer documentation
Both check_defer() and the global variable obj_cleanup_defer were removed from the public API two years ago. Now they were removed from the internals as well, simplifying the cleanup process greatly. We no longer need them to have a chance to understand the cleanup process. Also remove references to EVP_cleanup() since this has long been deprecated and now it doesn't clean up things anymore.
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/man/OBJ_create.369
1 files changed, 3 insertions, 66 deletions
diff --git a/src/lib/libcrypto/man/OBJ_create.3 b/src/lib/libcrypto/man/OBJ_create.3
index 7a6135e052..6bc255e981 100644
--- a/src/lib/libcrypto/man/OBJ_create.3
+++ b/src/lib/libcrypto/man/OBJ_create.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: OBJ_create.3,v 1.8 2023/09/06 12:26:59 schwarze Exp $ 1.\" $OpenBSD: OBJ_create.3,v 1.9 2024/01/13 19:06:20 tb Exp $
2.\" full merge up to: 2.\" full merge up to:
3.\" OpenSSL OBJ_nid2obj.pod 9b86974e Aug 17 15:21:33 2015 -0400 3.\" OpenSSL OBJ_nid2obj.pod 9b86974e Aug 17 15:21:33 2015 -0400
4.\" selective merge up to: 4.\" selective merge up to:
@@ -69,7 +69,7 @@
69.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 69.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
70.\" OF THE POSSIBILITY OF SUCH DAMAGE. 70.\" OF THE POSSIBILITY OF SUCH DAMAGE.
71.\" 71.\"
72.Dd $Mdocdate: September 6 2023 $ 72.Dd $Mdocdate: January 13 2024 $
73.Dt OBJ_CREATE 3 73.Dt OBJ_CREATE 3
74.Os 74.Os
75.Sh NAME 75.Sh NAME
@@ -78,9 +78,7 @@
78.Nm OBJ_create , 78.Nm OBJ_create ,
79.\" OBJ_create_and_add_object is a deprecated, unused alias for OBJ_create(3). 79.\" OBJ_create_and_add_object is a deprecated, unused alias for OBJ_create(3).
80.Nm OBJ_create_objects , 80.Nm OBJ_create_objects ,
81.Nm obj_cleanup_defer , 81.Nm OBJ_cleanup
82.Nm OBJ_cleanup ,
83.Nm check_defer
84.Nd modify the table of ASN.1 object identifiers 82.Nd modify the table of ASN.1 object identifiers
85.Sh SYNOPSIS 83.Sh SYNOPSIS
86.In openssl/objects.h 84.In openssl/objects.h
@@ -96,11 +94,8 @@
96.Fc 94.Fc
97.Ft int 95.Ft int
98.Fn OBJ_create_objects "BIO *in_bio" 96.Fn OBJ_create_objects "BIO *in_bio"
99.Vt extern int obj_cleanup_defer ;
100.Ft void 97.Ft void
101.Fn OBJ_cleanup void 98.Fn OBJ_cleanup void
102.Ft void
103.Fn check_defer "int nid"
104.Sh DESCRIPTION 99.Sh DESCRIPTION
105.Fn OBJ_new_nid 100.Fn OBJ_new_nid
106returns the smallest currently unassigned ASN.1 numeric 101returns the smallest currently unassigned ASN.1 numeric
@@ -154,16 +149,6 @@ or a similar function and then calling
154.Xr ASN1_OBJECT_free 3 149.Xr ASN1_OBJECT_free 3
155on the returned pointer will have no effect. 150on the returned pointer will have no effect.
156.Pp 151.Pp
157The global variable
158.Va obj_cleanup_defer
159controls the behaviour of
160.Fn OBJ_cleanup
161and
162.Xr EVP_cleanup 3 .
163.Pp
164If
165.Va obj_cleanup_defer
166has the default value of 0,
167.Fn OBJ_cleanup 152.Fn OBJ_cleanup
168resets the internal object table to its default state, 153resets the internal object table to its default state,
169removing and freeing all objects that were added with 154removing and freeing all objects that were added with
@@ -171,47 +156,6 @@ removing and freeing all objects that were added with
171.Fn OBJ_create , 156.Fn OBJ_create ,
172or 157or
173.Fn OBJ_create_objects . 158.Fn OBJ_create_objects .
174Otherwise,
175.Fn OBJ_cleanup
176only sets
177.Va obj_cleanup_defer
178to 2, which defers the cleanup of the internal object table
179to the next call of
180.Xr EVP_cleanup 3 .
181.Pp
182By default,
183.Xr EVP_cleanup 3
184has no effect on the internal object table.
185Only if
186.Va obj_cleanup_defer
187is 2, it resets
188.Va obj_cleanup_defer
189to 0 and calls
190.Fn OBJ_cleanup ,
191which then resets the table to its default state.
192.Pp
193The function
194.Fn check_defer
195sets
196.Va obj_cleanup_defer
197to 1 unless
198.Fa nid
199is a built-in numeric identifier, but it has no effect if
200.Va obj_cleanup_defer
201already differs from 0.
202This function is called internally by various functions
203in the EVP library, in particular by subroutines of
204.Xr OpenSSL_add_all_ciphers 3
205and
206.Xr OpenSSL_add_all_digests 3 .
207.Pp
208To reliably reset the internal object table no matter what the
209current state may be, an application program needs to call both
210.Fn OBJ_cleanup
211and
212.Xr EVP_cleanup 3 ,
213in this order.
214The opposite order will usually not work.
215.Sh RETURN VALUES 159.Sh RETURN VALUES
216.Fn OBJ_new_nid 160.Fn OBJ_new_nid
217returns the new NID. 161returns the new NID.
@@ -256,7 +200,6 @@ obj = OBJ_nid2obj(new_nid);
256.Ed 200.Ed
257.Sh SEE ALSO 201.Sh SEE ALSO
258.Xr ASN1_OBJECT_new 3 , 202.Xr ASN1_OBJECT_new 3 ,
259.Xr EVP_cleanup 3 ,
260.Xr OBJ_NAME_add 3 , 203.Xr OBJ_NAME_add 3 ,
261.Xr OBJ_nid2obj 3 204.Xr OBJ_nid2obj 3
262.Sh HISTORY 205.Sh HISTORY
@@ -269,12 +212,6 @@ first appeared in SSLeay 0.8.0 and
269in SSLeay 0.9.0. 212in SSLeay 0.9.0.
270These functions have been available since 213These functions have been available since
271.Ox 2.4 . 214.Ox 2.4 .
272.Pp
273.Va obj_cleanup_defer
274and
275.Fn check_defer
276first appeared in OpenSSL 1.0.0 and have been available since
277.Ox 4.9 .
278.Sh CAVEATS 215.Sh CAVEATS
279.Fn OBJ_add_object 216.Fn OBJ_add_object
280indicates success even after adding an incomplete object that was created with 217indicates success even after adding an incomplete object that was created with