summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2023-12-16 10:22:56 +0000
committertb <>2023-12-16 10:22:56 +0000
commit76360c9f2df37b5bb6d78b59e732d8f62ad8cab7 (patch)
tree58e2ca047114eaaff264d5d66315a1505c85bb73 /src
parent6ca0c8883c60c6abbbfb61d72fa5a87fc7ff57bb (diff)
downloadopenbsd-76360c9f2df37b5bb6d78b59e732d8f62ad8cab7.tar.gz
openbsd-76360c9f2df37b5bb6d78b59e732d8f62ad8cab7.tar.bz2
openbsd-76360c9f2df37b5bb6d78b59e732d8f62ad8cab7.zip
Remove ASN1_STRING_TABLE_{add,cleanup}() documentation
The unused ASN1_STRING_TABLE extensibility API will be removed in the next major bump and the table itself will become immutable. Lightly adjust the remaining text. In particular, update the RFC reference, stop talking about defaults when nothing can be changed anymore, do not mention useless flags that you will no longer be able to set and move the description of the only remaining flag after the description of ASN1_STRING_TABLE_get(). The file will be renamed in a second step.
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/man/ASN1_STRING_TABLE_add.385
1 files changed, 14 insertions, 71 deletions
diff --git a/src/lib/libcrypto/man/ASN1_STRING_TABLE_add.3 b/src/lib/libcrypto/man/ASN1_STRING_TABLE_add.3
index 482faa0f53..af5e810a39 100644
--- a/src/lib/libcrypto/man/ASN1_STRING_TABLE_add.3
+++ b/src/lib/libcrypto/man/ASN1_STRING_TABLE_add.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: ASN1_STRING_TABLE_add.3,v 1.9 2021/12/15 20:07:51 schwarze Exp $ 1.\" $OpenBSD: ASN1_STRING_TABLE_add.3,v 1.10 2023/12/16 10:22:56 tb Exp $
2.\" checked up to: 2.\" checked up to:
3.\" OpenSSL ASN1_STRING_TABLE_add.pod 7b608d08 Jul 27 01:18:50 2017 +0800 3.\" OpenSSL ASN1_STRING_TABLE_add.pod 7b608d08 Jul 27 01:18:50 2017 +0800
4.\" 4.\"
@@ -16,38 +16,26 @@
16.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18.\" 18.\"
19.Dd $Mdocdate: December 15 2021 $ 19.Dd $Mdocdate: December 16 2023 $
20.Dt ASN1_STRING_TABLE_ADD 3 20.Dt ASN1_STRING_TABLE_GET 3
21.Os 21.Os
22.Sh NAME 22.Sh NAME
23.Nm ASN1_STRING_TABLE_add , 23.Nm ASN1_STRING_TABLE_get
24.Nm ASN1_STRING_TABLE_get , 24.Nd retrieve an entry from the global ASN.1 string table
25.Nm ASN1_STRING_TABLE_cleanup
26.Nd maintain the global ASN.1 string table
27.Sh SYNOPSIS 25.Sh SYNOPSIS
28.In openssl/asn1.h 26.In openssl/asn1.h
29.Ft int
30.Fo ASN1_STRING_TABLE_add
31.Fa "int nid"
32.Fa "long minsize"
33.Fa "long maxsize"
34.Fa "unsigned long mask"
35.Fa "unsigned long flags"
36.Fc
37.Ft ASN1_STRING_TABLE * 27.Ft ASN1_STRING_TABLE *
38.Fo ASN1_STRING_TABLE_get 28.Fo ASN1_STRING_TABLE_get
39.Fa "int nid" 29.Fa "int nid"
40.Fc 30.Fc
41.Ft void
42.Fn ASN1_STRING_TABLE_cleanup void
43.Sh DESCRIPTION 31.Sh DESCRIPTION
44The ASN.1 string table is a unique global object. 32The ASN.1 string table is a unique global object.
45Each entry is of the type 33Each entry is of the type
46.Vt ASN1_STRING_TABLE 34.Vt ASN1_STRING_TABLE
47and contains information about one NID object. 35and contains information about one NID object.
48Some entries are predefined according to RFC 3280 appendix A.1. 36The entries are predefined according to RFC 5280 appendix A.1.
49.Pp 37.Pp
50By default, the upper bounds for the number of characters in various kinds of 38The upper bounds for the number of characters in various kinds of
51.Vt ASN1_STRING 39.Vt ASN1_STRING
52objects are: 40objects are:
53.Pp 41.Pp
@@ -68,58 +56,16 @@ objects are:
68.El 56.El
69.Pp 57.Pp
70The function 58The function
71.Fn ASN1_STRING_TABLE_add
72changes the existing entry for
73.Fa nid
74or, if there is none, allocates a new entry.
75The fields of the entry are overwritten with the function arguments
76of the same name.
77If
78.Fa minsize
79or
80.Fa maxsize
81is negative or
82.Fa mask
83is 0, that argument is ignored and the respective field remains unchanged,
84or for a new entry, it is set to \-1, \-1, 0, or
85.Dv STABLE_FLAGS_MALLOC ,
86respectively.
87.Pp
88The bits set in the
89.Fa flags
90argument are OR'ed into the existing field rather than overwriting it.
91The only useful flag is
92.Dv STABLE_NO_MASK .
93If it is set,
94.Xr ASN1_STRING_set_by_NID 3
95skips applying the global mask that can be set with
96.Xr ASN1_STRING_set_default_mask 3 .
97Otherwise, the table entry only accepts types
98permitted by both the global mask and the
99.Fa mask
100argument.
101Setting
102.Dv STABLE_FLAGS_MALLOC
103or any other bit in the
104.Fa mask
105argument has no effect.
106.Pp
107The function
108.Fn ASN1_STRING_TABLE_get 59.Fn ASN1_STRING_TABLE_get
109retrieves the entry for 60retrieves the entry for
110.Fa nid . 61.Fa nid .
111.Pp 62If the
112The function 63.Dv STABLE_NO_MASK
113.Fn ASN1_STRING_TABLE_cleanup 64flag is set,
114removes and frees all entries except the predefined ones 65.Xr ASN1_STRING_set_by_NID 3
115and restores the predefined ones to their default state. 66skips applying the global mask that can be set with
67.Xr ASN1_STRING_set_default_mask 3 .
116.Sh RETURN VALUES 68.Sh RETURN VALUES
117The
118.Fn ASN1_STRING_TABLE_add
119function returns 1 if successful; otherwise 0 is returned
120and an error code can be retrieved with
121.Xr ERR_get_error 3 .
122.Pp
123.Fn ASN1_STRING_TABLE_get 69.Fn ASN1_STRING_TABLE_get
124returns a valid 70returns a valid
125.Vt ASN1_STRING_TABLE 71.Vt ASN1_STRING_TABLE
@@ -132,10 +78,7 @@ if nothing is found.
132.Xr OBJ_create 3 , 78.Xr OBJ_create 3 ,
133.Xr OBJ_nid2obj 3 79.Xr OBJ_nid2obj 3
134.Sh HISTORY 80.Sh HISTORY
135.Fn ASN1_STRING_TABLE_add , 81.Fn ASN1_STRING_TABLE_get
136.Fn ASN1_STRING_TABLE_get ,
137and
138.Fn ASN1_STRING_TABLE_cleanup
139first appeared in OpenSSL 0.9.5 and have been available since 82first appeared in OpenSSL 0.9.5 and have been available since
140.Ox 2.7 . 83.Ox 2.7 .
141.Sh BUGS 84.Sh BUGS