summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorschwarze <>2023-09-12 12:11:05 +0000
committerschwarze <>2023-09-12 12:11:05 +0000
commitd4f66fd58741d8da1a8a46df900cfcded61a4af2 (patch)
tree16dcf82a5c8cef3aace50928573e0a325fbe2c91 /src/lib
parentc14354df0ba650d5c2288f522ab61e73e2b8ee6b (diff)
downloadopenbsd-d4f66fd58741d8da1a8a46df900cfcded61a4af2.tar.gz
openbsd-d4f66fd58741d8da1a8a46df900cfcded61a4af2.tar.bz2
openbsd-d4f66fd58741d8da1a8a46df900cfcded61a4af2.zip
fix the vague and misleading description of the EVP_MD_FLAG_* constants
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/man/EVP_MD_meth_new.394
1 files changed, 72 insertions, 22 deletions
diff --git a/src/lib/libcrypto/man/EVP_MD_meth_new.3 b/src/lib/libcrypto/man/EVP_MD_meth_new.3
index 0876312ac3..37b55b9e00 100644
--- a/src/lib/libcrypto/man/EVP_MD_meth_new.3
+++ b/src/lib/libcrypto/man/EVP_MD_meth_new.3
@@ -1,8 +1,25 @@
1.\" $OpenBSD: EVP_MD_meth_new.3,v 1.3 2023/08/12 16:48:23 schwarze Exp $ 1.\" $OpenBSD: EVP_MD_meth_new.3,v 1.4 2023/09/12 12:11:05 schwarze Exp $
2.\" selective merge up to: 2.\" selective merge up to:
3.\" OpenSSL man3/EVP_MD_meth_new 0388d212 Dec 14 12:47:07 2018 -0800 3.\" OpenSSL man3/EVP_MD_meth_new 0388d212 Dec 14 12:47:07 2018 -0800
4.\" 4.\"
5.\" This file was written by Richard Levitte <levitte@openssl.org> 5.\" This file is a derived work.
6.\" The changes are covered by the following Copyright and license:
7.\"
8.\" Copyright (c) 2023 Ingo Schwarze <schwarze@openbsd.org>
9.\"
10.\" Permission to use, copy, modify, and distribute this software for any
11.\" purpose with or without fee is hereby granted, provided that the above
12.\" copyright notice and this permission notice appear in all copies.
13.\"
14.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
15.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
16.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
17.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
18.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
19.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
20.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21.\"
22.\" The original file was written by Richard Levitte <levitte@openssl.org>
6.\" Copyright (c) 2015 The OpenSSL Project. All rights reserved. 23.\" Copyright (c) 2015 The OpenSSL Project. All rights reserved.
7.\" 24.\"
8.\" Redistribution and use in source and binary forms, with or without 25.\" Redistribution and use in source and binary forms, with or without
@@ -49,7 +66,7 @@
49.\" 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
50.\" OF THE POSSIBILITY OF SUCH DAMAGE. 67.\" OF THE POSSIBILITY OF SUCH DAMAGE.
51.\" 68.\"
52.Dd $Mdocdate: August 12 2023 $ 69.Dd $Mdocdate: September 12 2023 $
53.Dt EVP_MD_METH_NEW 3 70.Dt EVP_MD_METH_NEW 3
54.Os 71.Os
55.Sh NAME 72.Sh NAME
@@ -179,26 +196,59 @@ sets the flags to describe optional behaviours in the particular
179Several flags can be or'd together. 196Several flags can be or'd together.
180The available flags are: 197The available flags are:
181.Bl -tag -width Ds 198.Bl -tag -width Ds
182.It EVP_MD_FLAG_ONESHOT 199.It Dv EVP_MD_FLAG_DIGALGID_NULL
183This digest method can only handle one block of input. 200When setting up a
184.It EVP_MD_FLAG_DIGALGID_NULL 201.Vt DigestAlgorithmIdentifier
185When setting up a DigestAlgorithmIdentifier, this flag will have the 202with
186parameter set to NULL by default. 203.Xr X509_ALGOR_set_md 3 ,
204set the parameter type to
205.Dv V_ASN1_NULL
206and the parameter value to
207.Dv NULL .
208This is the default, which means that it takes effect for
209.Vt EVP_MD
210objects that do not have
211.Dv EVP_MD_FLAG_DIGALGID_ABSENT
212set.
187Use this for PKCS#1. 213Use this for PKCS#1.
188.Em Note: if combined with EVP_MD_FLAG_DIGALGID_ABSENT, the latter will override. 214.It Dv EVP_MD_FLAG_DIGALGID_ABSENT
189.It EVP_MD_FLAG_DIGALGID_ABSENT 215When setting up a
190When setting up a DigestAlgorithmIdentifier, this flag will have the 216.Vt DigestAlgorithmIdentifier
191parameter be left absent by default. 217with
192.Em Note: if combined with EVP_MD_FLAG_DIGALGID_NULL, the latter will be overridden. 218.Xr X509_ALGOR_set_md 3 ,
193.It EVP_MD_FLAG_DIGALGID_CUSTOM 219set the parameter type to
194Custom DigestAlgorithmIdentifier handling via ctrl, with 220.Dv V_ASN1_UNDEF
195.Sy EVP_MD_FLAG_DIGALGID_ABSENT 221and the parameter value to
196as default. 222.Dv NULL .
197.Em Note: if combined with EVP_MD_FLAG_DIGALGID_NULL, the latter will be overridden. 223This is used by the
198Currently unused. 224.Vt EVP_MD
199.It EVP_MD_FLAG_FIPS 225objects documented in the manual page
200This digest method is suitable for use in FIPS mode. 226.Xr EVP_sha3_224 3
201Currently unused. 227and by the objects returned from
228.Xr EVP_sha512 3 ,
229.Xr EVP_sha512_256 3 ,
230.Xr EVP_sha512_224 3 ,
231.Xr EVP_sha384 3 ,
232.Xr EVP_sha256 3 ,
233.Xr EVP_sha224 3 ,
234.Xr EVP_sha1 3 ,
235and
236.Xr EVP_sm3 3 .
237.It Dv EVP_MD_FLAG_DIGALGID_CUSTOM
238This flag is reserved for used-defined
239.Vt EVP_MD
240objects supporting custom
241.Vt DigestAlgorithmIdentifier
242handling via
243.Xr EVP_MD_CTX_ctrl 3 ,
244but actually, it is ignored by both LibreSSL and OpenSSL
245and such user-defined behaviour is not supported by the libraries.
246.It Dv EVP_MD_FLAG_FIPS
247Mark the digest method as suitable for FIPS mode.
248This flag is ignored by both LibreSSL and OpenSSL.
249.It Dv EVP_MD_FLAG_ONESHOT
250Intended to indicate that the digest method can only handle one block
251of input, but actually, this flag is ignored by both LibreSSL and OpenSSL.
202.El 252.El
203.Pp 253.Pp
204.Fn EVP_MD_meth_set_init 254.Fn EVP_MD_meth_set_init