diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/man/OBJ_create.3 | 69 |
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 |
| 106 | returns the smallest currently unassigned ASN.1 numeric | 101 | returns 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 |
| 155 | on the returned pointer will have no effect. | 150 | on the returned pointer will have no effect. |
| 156 | .Pp | 151 | .Pp |
| 157 | The global variable | ||
| 158 | .Va obj_cleanup_defer | ||
| 159 | controls the behaviour of | ||
| 160 | .Fn OBJ_cleanup | ||
| 161 | and | ||
| 162 | .Xr EVP_cleanup 3 . | ||
| 163 | .Pp | ||
| 164 | If | ||
| 165 | .Va obj_cleanup_defer | ||
| 166 | has the default value of 0, | ||
| 167 | .Fn OBJ_cleanup | 152 | .Fn OBJ_cleanup |
| 168 | resets the internal object table to its default state, | 153 | resets the internal object table to its default state, |
| 169 | removing and freeing all objects that were added with | 154 | removing 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 , |
| 172 | or | 157 | or |
| 173 | .Fn OBJ_create_objects . | 158 | .Fn OBJ_create_objects . |
| 174 | Otherwise, | ||
| 175 | .Fn OBJ_cleanup | ||
| 176 | only sets | ||
| 177 | .Va obj_cleanup_defer | ||
| 178 | to 2, which defers the cleanup of the internal object table | ||
| 179 | to the next call of | ||
| 180 | .Xr EVP_cleanup 3 . | ||
| 181 | .Pp | ||
| 182 | By default, | ||
| 183 | .Xr EVP_cleanup 3 | ||
| 184 | has no effect on the internal object table. | ||
| 185 | Only if | ||
| 186 | .Va obj_cleanup_defer | ||
| 187 | is 2, it resets | ||
| 188 | .Va obj_cleanup_defer | ||
| 189 | to 0 and calls | ||
| 190 | .Fn OBJ_cleanup , | ||
| 191 | which then resets the table to its default state. | ||
| 192 | .Pp | ||
| 193 | The function | ||
| 194 | .Fn check_defer | ||
| 195 | sets | ||
| 196 | .Va obj_cleanup_defer | ||
| 197 | to 1 unless | ||
| 198 | .Fa nid | ||
| 199 | is a built-in numeric identifier, but it has no effect if | ||
| 200 | .Va obj_cleanup_defer | ||
| 201 | already differs from 0. | ||
| 202 | This function is called internally by various functions | ||
| 203 | in the EVP library, in particular by subroutines of | ||
| 204 | .Xr OpenSSL_add_all_ciphers 3 | ||
| 205 | and | ||
| 206 | .Xr OpenSSL_add_all_digests 3 . | ||
| 207 | .Pp | ||
| 208 | To reliably reset the internal object table no matter what the | ||
| 209 | current state may be, an application program needs to call both | ||
| 210 | .Fn OBJ_cleanup | ||
| 211 | and | ||
| 212 | .Xr EVP_cleanup 3 , | ||
| 213 | in this order. | ||
| 214 | The opposite order will usually not work. | ||
| 215 | .Sh RETURN VALUES | 159 | .Sh RETURN VALUES |
| 216 | .Fn OBJ_new_nid | 160 | .Fn OBJ_new_nid |
| 217 | returns the new NID. | 161 | returns 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 | |||
| 269 | in SSLeay 0.9.0. | 212 | in SSLeay 0.9.0. |
| 270 | These functions have been available since | 213 | These functions have been available since |
| 271 | .Ox 2.4 . | 214 | .Ox 2.4 . |
| 272 | .Pp | ||
| 273 | .Va obj_cleanup_defer | ||
| 274 | and | ||
| 275 | .Fn check_defer | ||
| 276 | first 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 |
| 280 | indicates success even after adding an incomplete object that was created with | 217 | indicates success even after adding an incomplete object that was created with |
