diff options
Diffstat (limited to 'src/lib/libcrypto/man/v2i_ASN1_BIT_STRING.3')
-rw-r--r-- | src/lib/libcrypto/man/v2i_ASN1_BIT_STRING.3 | 125 |
1 files changed, 0 insertions, 125 deletions
diff --git a/src/lib/libcrypto/man/v2i_ASN1_BIT_STRING.3 b/src/lib/libcrypto/man/v2i_ASN1_BIT_STRING.3 deleted file mode 100644 index 36d9f7496b..0000000000 --- a/src/lib/libcrypto/man/v2i_ASN1_BIT_STRING.3 +++ /dev/null | |||
@@ -1,125 +0,0 @@ | |||
1 | .\" $OpenBSD: v2i_ASN1_BIT_STRING.3,v 1.1 2024/12/24 09:48:56 schwarze Exp $ | ||
2 | .\" | ||
3 | .\" Copyright (c) 2024 Ingo Schwarze <schwarze@openbsd.org> | ||
4 | .\" | ||
5 | .\" Permission to use, copy, modify, and distribute this software for any | ||
6 | .\" purpose with or without fee is hereby granted, provided that the above | ||
7 | .\" copyright notice and this permission notice appear in all copies. | ||
8 | .\" | ||
9 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | .\" | ||
17 | .Dd $Mdocdate: December 24 2024 $ | ||
18 | .Dt V2I_ASN1_BIT_STRING 3 | ||
19 | .Os | ||
20 | .Sh NAME | ||
21 | .Nm v2i_ASN1_BIT_STRING , | ||
22 | .Nm i2v_ASN1_BIT_STRING | ||
23 | .Nd ASN.1 BIT STRING utility functions for certificate extensions | ||
24 | .Sh SYNOPSIS | ||
25 | .In openssl/x509v3.h | ||
26 | .Ft ASN1_BIT_STRING * | ||
27 | .Fo v2i_ASN1_BIT_STRING | ||
28 | .Fa "X509V3_EXT_METHOD *method" | ||
29 | .Fa "X509V3_CTX *ctx" | ||
30 | .Fa "STACK_OF(CONF_VALUE) *nval" | ||
31 | .Fc | ||
32 | .Ft STACK_OF(CONF_VALUE) * | ||
33 | .Fo i2v_ASN1_BIT_STRING | ||
34 | .Fa "X509V3_EXT_METHOD *method" | ||
35 | .Fa "ASN1_BIT_STRING *bit_string" | ||
36 | .Fa "STACK_OF(CONF_VALUE) *nval" | ||
37 | .Fc | ||
38 | .Sh DESCRIPTION | ||
39 | .Fn v2i_ASN1_BIT_STRING | ||
40 | allocates a new ASN.1 | ||
41 | .Vt BIT STRING | ||
42 | object and initializes it from a list of bit names. | ||
43 | The | ||
44 | .Fa nval | ||
45 | argument is essentially used as the list of the names of the bits to set. | ||
46 | Both long names and short names can be used. | ||
47 | One name is taken from each element of | ||
48 | .Fa nval . | ||
49 | The | ||
50 | .Fa ctx | ||
51 | argument and any section names or values contained in the elements of | ||
52 | .Fa nval | ||
53 | are ignored. | ||
54 | To convert a C string containing a comma-separated list of names | ||
55 | to the input format of this function, | ||
56 | .Xr X509V3_parse_list 3 | ||
57 | can be used. | ||
58 | .Pp | ||
59 | .Fn i2v_ASN1_BIT_STRING | ||
60 | translates the numbers of the bits that are set in the | ||
61 | .Fa bit_string | ||
62 | to long names. | ||
63 | For each bit that is set, | ||
64 | one element containing the corresponding long name is added to | ||
65 | .Fa nval . | ||
66 | If a | ||
67 | .Dv NULL | ||
68 | pointer is passed for the | ||
69 | .Fa nval | ||
70 | argument, a new | ||
71 | .Vt STACK_OF(CONF_VALUE) | ||
72 | is allocated. | ||
73 | .Pp | ||
74 | For both functions, the | ||
75 | .Fa method | ||
76 | argument is only used for the translation of bit names to bit numbers | ||
77 | and vice versa. | ||
78 | Any names and bit numbers that do not occur in the | ||
79 | .Fa usr_data | ||
80 | translation table in the | ||
81 | .Fa method | ||
82 | are silently ignored. | ||
83 | .Pp | ||
84 | For the following arguments, | ||
85 | .Xr X509V3_EXT_get_nid 3 | ||
86 | returns static constant | ||
87 | .Fa method | ||
88 | objects supporting these functions: | ||
89 | .Pp | ||
90 | .Bl -tag -width NID_netscape_cert_type -compact | ||
91 | .It Dv NID_crl_reason | ||
92 | reason codes, RFC 5280 section 5.3.1 | ||
93 | .It Dv NID_key_usage | ||
94 | key usage purposes, RFC 5280 section 4.2.1.3 | ||
95 | .It Dv NID_netscape_cert_type | ||
96 | Netscape certificate types (obsolete) | ||
97 | .El | ||
98 | .Pp | ||
99 | While an application program could theoretically provide its own | ||
100 | .Fa method | ||
101 | object containing a custom translation table, that is unlikely to be | ||
102 | useful for any practical purpose. | ||
103 | .Sh RETURN VALUES | ||
104 | .Fn v2i_ASN1_BIT_STRING | ||
105 | returns the new | ||
106 | .Vt BIT STRING | ||
107 | object and | ||
108 | .Fn i2v_ASN1_BIT_STRING | ||
109 | the modified or new list of bit names. | ||
110 | Both functions return | ||
111 | .Dv NULL | ||
112 | if an error occurs, in particular if memory allocation fails. | ||
113 | .Sh SEE ALSO | ||
114 | .Xr ASN1_BIT_STRING_new 3 , | ||
115 | .Xr ASN1_BIT_STRING_set 3 , | ||
116 | .Xr i2s_ASN1_ENUMERATED_TABLE 3 , | ||
117 | .Xr STACK_OF 3 , | ||
118 | .Xr tls_peer_ocsp_crl_reason 3 , | ||
119 | .Xr X509_get_key_usage 3 , | ||
120 | .Xr X509V3_EXT_get_nid 3 , | ||
121 | .Xr X509V3_get_d2i 3 , | ||
122 | .Xr X509V3_parse_list 3 | ||
123 | .Sh HISTORY | ||
124 | These functions first appeared in OpenSSL 0.9.8 and have been available since | ||
125 | .Ox 4.5 . | ||