summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/v2i_ASN1_BIT_STRING.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/man/v2i_ASN1_BIT_STRING.3')
-rw-r--r--src/lib/libcrypto/man/v2i_ASN1_BIT_STRING.3125
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
40allocates a new ASN.1
41.Vt BIT STRING
42object and initializes it from a list of bit names.
43The
44.Fa nval
45argument is essentially used as the list of the names of the bits to set.
46Both long names and short names can be used.
47One name is taken from each element of
48.Fa nval .
49The
50.Fa ctx
51argument and any section names or values contained in the elements of
52.Fa nval
53are ignored.
54To convert a C string containing a comma-separated list of names
55to the input format of this function,
56.Xr X509V3_parse_list 3
57can be used.
58.Pp
59.Fn i2v_ASN1_BIT_STRING
60translates the numbers of the bits that are set in the
61.Fa bit_string
62to long names.
63For each bit that is set,
64one element containing the corresponding long name is added to
65.Fa nval .
66If a
67.Dv NULL
68pointer is passed for the
69.Fa nval
70argument, a new
71.Vt STACK_OF(CONF_VALUE)
72is allocated.
73.Pp
74For both functions, the
75.Fa method
76argument is only used for the translation of bit names to bit numbers
77and vice versa.
78Any names and bit numbers that do not occur in the
79.Fa usr_data
80translation table in the
81.Fa method
82are silently ignored.
83.Pp
84For the following arguments,
85.Xr X509V3_EXT_get_nid 3
86returns static constant
87.Fa method
88objects supporting these functions:
89.Pp
90.Bl -tag -width NID_netscape_cert_type -compact
91.It Dv NID_crl_reason
92reason codes, RFC 5280 section 5.3.1
93.It Dv NID_key_usage
94key usage purposes, RFC 5280 section 4.2.1.3
95.It Dv NID_netscape_cert_type
96Netscape certificate types (obsolete)
97.El
98.Pp
99While an application program could theoretically provide its own
100.Fa method
101object containing a custom translation table, that is unlikely to be
102useful for any practical purpose.
103.Sh RETURN VALUES
104.Fn v2i_ASN1_BIT_STRING
105returns the new
106.Vt BIT STRING
107object and
108.Fn i2v_ASN1_BIT_STRING
109the modified or new list of bit names.
110Both functions return
111.Dv NULL
112if 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
124These functions first appeared in OpenSSL 0.9.8 and have been available since
125.Ox 4.5 .