diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/man/ASN1_STRING_TABLE_add.3 | 85 |
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 |
| 44 | The ASN.1 string table is a unique global object. | 32 | The ASN.1 string table is a unique global object. |
| 45 | Each entry is of the type | 33 | Each entry is of the type |
| 46 | .Vt ASN1_STRING_TABLE | 34 | .Vt ASN1_STRING_TABLE |
| 47 | and contains information about one NID object. | 35 | and contains information about one NID object. |
| 48 | Some entries are predefined according to RFC 3280 appendix A.1. | 36 | The entries are predefined according to RFC 5280 appendix A.1. |
| 49 | .Pp | 37 | .Pp |
| 50 | By default, the upper bounds for the number of characters in various kinds of | 38 | The upper bounds for the number of characters in various kinds of |
| 51 | .Vt ASN1_STRING | 39 | .Vt ASN1_STRING |
| 52 | objects are: | 40 | objects are: |
| 53 | .Pp | 41 | .Pp |
| @@ -68,58 +56,16 @@ objects are: | |||
| 68 | .El | 56 | .El |
| 69 | .Pp | 57 | .Pp |
| 70 | The function | 58 | The function |
| 71 | .Fn ASN1_STRING_TABLE_add | ||
| 72 | changes the existing entry for | ||
| 73 | .Fa nid | ||
| 74 | or, if there is none, allocates a new entry. | ||
| 75 | The fields of the entry are overwritten with the function arguments | ||
| 76 | of the same name. | ||
| 77 | If | ||
| 78 | .Fa minsize | ||
| 79 | or | ||
| 80 | .Fa maxsize | ||
| 81 | is negative or | ||
| 82 | .Fa mask | ||
| 83 | is 0, that argument is ignored and the respective field remains unchanged, | ||
| 84 | or for a new entry, it is set to \-1, \-1, 0, or | ||
| 85 | .Dv STABLE_FLAGS_MALLOC , | ||
| 86 | respectively. | ||
| 87 | .Pp | ||
| 88 | The bits set in the | ||
| 89 | .Fa flags | ||
| 90 | argument are OR'ed into the existing field rather than overwriting it. | ||
| 91 | The only useful flag is | ||
| 92 | .Dv STABLE_NO_MASK . | ||
| 93 | If it is set, | ||
| 94 | .Xr ASN1_STRING_set_by_NID 3 | ||
| 95 | skips applying the global mask that can be set with | ||
| 96 | .Xr ASN1_STRING_set_default_mask 3 . | ||
| 97 | Otherwise, the table entry only accepts types | ||
| 98 | permitted by both the global mask and the | ||
| 99 | .Fa mask | ||
| 100 | argument. | ||
| 101 | Setting | ||
| 102 | .Dv STABLE_FLAGS_MALLOC | ||
| 103 | or any other bit in the | ||
| 104 | .Fa mask | ||
| 105 | argument has no effect. | ||
| 106 | .Pp | ||
| 107 | The function | ||
| 108 | .Fn ASN1_STRING_TABLE_get | 59 | .Fn ASN1_STRING_TABLE_get |
| 109 | retrieves the entry for | 60 | retrieves the entry for |
| 110 | .Fa nid . | 61 | .Fa nid . |
| 111 | .Pp | 62 | If the |
| 112 | The function | 63 | .Dv STABLE_NO_MASK |
| 113 | .Fn ASN1_STRING_TABLE_cleanup | 64 | flag is set, |
| 114 | removes and frees all entries except the predefined ones | 65 | .Xr ASN1_STRING_set_by_NID 3 |
| 115 | and restores the predefined ones to their default state. | 66 | skips 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 |
| 117 | The | ||
| 118 | .Fn ASN1_STRING_TABLE_add | ||
| 119 | function returns 1 if successful; otherwise 0 is returned | ||
| 120 | and 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 |
| 124 | returns a valid | 70 | returns 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 , | ||
| 137 | and | ||
| 138 | .Fn ASN1_STRING_TABLE_cleanup | ||
| 139 | first appeared in OpenSSL 0.9.5 and have been available since | 82 | first 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 |
