summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/man/X509_ALGOR_dup.347
1 files changed, 33 insertions, 14 deletions
diff --git a/src/lib/libcrypto/man/X509_ALGOR_dup.3 b/src/lib/libcrypto/man/X509_ALGOR_dup.3
index 56d9674c7c..0b878b7a86 100644
--- a/src/lib/libcrypto/man/X509_ALGOR_dup.3
+++ b/src/lib/libcrypto/man/X509_ALGOR_dup.3
@@ -1,9 +1,10 @@
1.\" $OpenBSD: X509_ALGOR_dup.3,v 1.18 2023/10/09 16:59:55 tb Exp $ 1.\" $OpenBSD: X509_ALGOR_dup.3,v 1.19 2023/10/10 13:59:47 tb Exp $
2.\" OpenSSL 4692340e Jun 7 15:49:08 2016 -0400 2.\" OpenSSL 4692340e Jun 7 15:49:08 2016 -0400
3.\" 3.\"
4.\" This file is a derived work. 4.\" This file is a derived work.
5.\" The changes are covered by the following Copyright and license: 5.\" The changes are covered by the following Copyright and license:
6.\" 6.\"
7.\" Copyright (c) 2023 Theo Buehler <tb@openbsd.org>
7.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> 8.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
8.\" 9.\"
9.\" Permission to use, copy, modify, and distribute this software for any 10.\" Permission to use, copy, modify, and distribute this software for any
@@ -65,7 +66,7 @@
65.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 66.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
66.\" OF THE POSSIBILITY OF SUCH DAMAGE. 67.\" OF THE POSSIBILITY OF SUCH DAMAGE.
67.\" 68.\"
68.Dd $Mdocdate: October 9 2023 $ 69.Dd $Mdocdate: October 10 2023 $
69.Dt X509_ALGOR_DUP 3 70.Dt X509_ALGOR_DUP 3
70.Os 71.Os
71.Sh NAME 72.Sh NAME
@@ -112,17 +113,39 @@
112.Fa "const X509_ALGOR *b" 113.Fa "const X509_ALGOR *b"
113.Fc 114.Fc
114.Sh DESCRIPTION 115.Sh DESCRIPTION
115.Fn X509_ALGOR_new 116An
116allocates and initializes an empty
117.Vt X509_ALGOR 117.Vt X509_ALGOR
118object, representing an ASN.1 118object represents an ASN.1
119.Vt AlgorithmIdentifier 119.Vt AlgorithmIdentifier
120structure defined in RFC 5280 section 4.1.1.2. 120structure defined in RFC 5280 section 4.1.1.2.
121Such objects can specify a cryptographic algorithm together 121It specifies a cryptographic
122with algorithm-specific parameters. 122.Fa algorithm
123They are used by many other objects, for example certificates, 123by an ASN.1 object identifier (OID) that can be obtained from
124.Xr OBJ_nid2obj 3 ,
125together with optional algorithm-specific
126.Fa parameters
127of the type
128.Vt ASN1_TYPE ,
129see
130.Xr ASN1_TYPE_set 3 .
131.Vt X509_ALGOR
132objects are used by many other objects, for example certificates,
124certificate revocation lists, and certificate requests. 133certificate revocation lists, and certificate requests.
125.Pp 134.Pp
135.Fn X509_ALGOR_new
136allocates a new
137.Vt X509_ALGOR
138object containing the object that
139.Xr OBJ_nid2obj 3
140returns for
141.Dv NID_undef
142as the
143.Fa algorithm
144and a
145.Dv NULL
146pointer as the
147.Fa parameters .
148.Pp
126.Fn X509_ALGOR_free 149.Fn X509_ALGOR_free
127frees 150frees
128.Fa alg 151.Fa alg
@@ -210,12 +233,7 @@ can leave
210.Fa alg 233.Fa alg
211in a corrupted state due to memory allocation failure. 234in a corrupted state due to memory allocation failure.
212This problem can be avoided by preallocating with an error-checked call to 235This problem can be avoided by preallocating with an error-checked call to
213.Fn X509_ALGOR_set0 alg NULL 0 NULL , 236.Fn X509_ALGOR_set0 alg NULL 0 NULL .
214or the failure can be identified by
215.Fn X509_ALGOR_get0 &aobj NULL NULL alg
216returning a
217.Dv NULL
218.Fa aobj .
219.Pp 237.Pp
220.Fn X509_ALGOR_cmp 238.Fn X509_ALGOR_cmp
221compares 239compares
@@ -249,6 +267,7 @@ have identical encodings or non-zero otherwise.
249.Xr ASN1_TYPE_set 3 , 267.Xr ASN1_TYPE_set 3 ,
250.Xr d2i_X509_ALGOR 3 , 268.Xr d2i_X509_ALGOR 3 ,
251.Xr EVP_DigestInit 3 , 269.Xr EVP_DigestInit 3 ,
270.Xr OBJ_nid2obj 3 ,
252.Xr X509_get0_signature 3 , 271.Xr X509_get0_signature 3 ,
253.Xr X509_new 3 , 272.Xr X509_new 3 ,
254.Xr X509_PUBKEY_get0_param 3 , 273.Xr X509_PUBKEY_get0_param 3 ,