diff options
Diffstat (limited to '')
-rw-r--r-- | src/lib/libcrypto/man/ASN1_STRING_TABLE_add.3 | 92 | ||||
-rw-r--r-- | src/lib/libcrypto/man/Makefile | 3 |
2 files changed, 94 insertions, 1 deletions
diff --git a/src/lib/libcrypto/man/ASN1_STRING_TABLE_add.3 b/src/lib/libcrypto/man/ASN1_STRING_TABLE_add.3 new file mode 100644 index 0000000000..389503d191 --- /dev/null +++ b/src/lib/libcrypto/man/ASN1_STRING_TABLE_add.3 | |||
@@ -0,0 +1,92 @@ | |||
1 | .\" $OpenBSD: ASN1_STRING_TABLE_add.3,v 1.1 2017/08/20 15:01:20 schwarze Exp $ | ||
2 | .\" OpenSSL ASN1_STRING_TABLE_add.pod 7b608d08 Jul 27 01:18:50 2017 +0800 | ||
3 | .\" | ||
4 | .\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org> | ||
5 | .\" | ||
6 | .\" Permission to use, copy, modify, and distribute this software for any | ||
7 | .\" purpose with or without fee is hereby granted, provided that the above | ||
8 | .\" copyright notice and this permission notice appear in all copies. | ||
9 | .\" | ||
10 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
11 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
12 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
13 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
14 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
15 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
16 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
17 | .\" | ||
18 | .Dd $Mdocdate: August 20 2017 $ | ||
19 | .Dt ASN1_STRING_TABLE_ADD 3 | ||
20 | .Os | ||
21 | .Sh NAME | ||
22 | .Nm ASN1_STRING_TABLE_add , | ||
23 | .Nm ASN1_STRING_TABLE_get , | ||
24 | .Nm ASN1_STRING_TABLE_cleanup | ||
25 | .Nd maintain the global ASN.1 string table | ||
26 | .Sh SYNOPSIS | ||
27 | .In openssl/asn1.h | ||
28 | .Ft int | ||
29 | .Fo ASN1_STRING_TABLE_add | ||
30 | .Fa "int nid" | ||
31 | .Fa "long minsize" | ||
32 | .Fa "long maxsize" | ||
33 | .Fa "unsigned long mask" | ||
34 | .Fa "unsigned long flags" | ||
35 | .Fc | ||
36 | .Ft ASN1_STRING_TABLE * | ||
37 | .Fo ASN1_STRING_TABLE_get | ||
38 | .Fa "int nid" | ||
39 | .Fc | ||
40 | .Ft void | ||
41 | .Fn ASN1_STRING_TABLE_cleanup void | ||
42 | .Sh DESCRIPTION | ||
43 | The ASN.1 string table is a unique global object. | ||
44 | Each entry is of the type | ||
45 | .Vt ASN1_STRING_TABLE | ||
46 | and contains information about one NID object. | ||
47 | Some entries are predefined according to RFC 3280 appendix A.1. | ||
48 | .Pp | ||
49 | The function | ||
50 | .Fn ASN1_STRING_TABLE_add | ||
51 | changes the existing entry for | ||
52 | .Fa nid | ||
53 | or, if there is none, allocates a new entry. | ||
54 | Each field of the entry is modified according to the function argument | ||
55 | of the same name. | ||
56 | The | ||
57 | .Fa minsize | ||
58 | and | ||
59 | .Fa maxsize | ||
60 | arguments overwrite the existing fields unless they are \-1. | ||
61 | The | ||
62 | .Fa mask | ||
63 | argument always overwrites the existing field. | ||
64 | The bits set in the | ||
65 | .Fa flags | ||
66 | argument are OR'ed into the existing field. | ||
67 | No useful flags are currently defined, so passing 0 is recommended. | ||
68 | .Pp | ||
69 | The function | ||
70 | .Fn ASN1_STRING_TABLE_get | ||
71 | retrieves the entry for | ||
72 | .Fa nid . | ||
73 | .Pp | ||
74 | The function | ||
75 | .Fn ASN1_STRING_TABLE_cleanup | ||
76 | removes and frees all entries except the predefined ones. | ||
77 | .Sh RETURN VALUES | ||
78 | .Fn ASN1_STRING_TABLE_add | ||
79 | returns 1 on success or 0 if an error occurred. | ||
80 | .Pp | ||
81 | .Fn ASN1_STRING_TABLE_get | ||
82 | returns a valid | ||
83 | .Vt ASN1_STRING_TABLE | ||
84 | structure or | ||
85 | .Dv NULL | ||
86 | if nothing is found. | ||
87 | .Sh SEE ALSO | ||
88 | .Xr ASN1_OBJECT_new 3 , | ||
89 | .Xr ERR_get_error 3 , | ||
90 | .Xr OBJ_nid2obj 3 | ||
91 | .Sh BUGS | ||
92 | Most aspects of the semantics considerably differ from OpenSSL. | ||
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile index 164f7e24b1..cd14bdcdb3 100644 --- a/src/lib/libcrypto/man/Makefile +++ b/src/lib/libcrypto/man/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.120 2017/04/10 17:45:06 schwarze Exp $ | 1 | # $OpenBSD: Makefile,v 1.121 2017/08/20 15:01:20 schwarze Exp $ |
2 | 2 | ||
3 | .include <bsd.own.mk> | 3 | .include <bsd.own.mk> |
4 | 4 | ||
@@ -8,6 +8,7 @@ MAN= \ | |||
8 | ASN1_STRING_length.3 \ | 8 | ASN1_STRING_length.3 \ |
9 | ASN1_STRING_new.3 \ | 9 | ASN1_STRING_new.3 \ |
10 | ASN1_STRING_print_ex.3 \ | 10 | ASN1_STRING_print_ex.3 \ |
11 | ASN1_STRING_TABLE_add.3 \ | ||
11 | ASN1_TIME_set.3 \ | 12 | ASN1_TIME_set.3 \ |
12 | ASN1_TYPE_get.3 \ | 13 | ASN1_TYPE_get.3 \ |
13 | ASN1_generate_nconf.3 \ | 14 | ASN1_generate_nconf.3 \ |