From 7d234dcc17ac7d1f1e40231a17185c05973a1aaa Mon Sep 17 00:00:00 2001 From: schwarze Date: Sat, 12 Aug 2023 16:48:23 +0000 Subject: [PATCH] document return values of the control function in EVP_MD_meth_set_ctrl(3) --- lib/libcrypto/man/EVP_MD_meth_new.3 | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/lib/libcrypto/man/EVP_MD_meth_new.3 b/lib/libcrypto/man/EVP_MD_meth_new.3 index d6720ef8bc2..0876312ac3e 100644 --- a/lib/libcrypto/man/EVP_MD_meth_new.3 +++ b/lib/libcrypto/man/EVP_MD_meth_new.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: EVP_MD_meth_new.3,v 1.2 2023/07/09 06:47:51 tb Exp $ +.\" $OpenBSD: EVP_MD_meth_new.3,v 1.3 2023/08/12 16:48:23 schwarze Exp $ .\" selective merge up to: .\" OpenSSL man3/EVP_MD_meth_new 0388d212 Dec 14 12:47:07 2018 -0800 .\" @@ -49,7 +49,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED .\" OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: July 9 2023 $ +.Dd $Mdocdate: August 12 2023 $ .Dt EVP_MD_METH_NEW 3 .Os .Sh NAME @@ -130,7 +130,7 @@ .Ft int .Fo EVP_MD_meth_set_ctrl .Fa "EVP_MD *md" -.Fa "int (*ctrl)(EVP_MD_CTX *ctx, int cmd, int p1, void *p2)" +.Fa "int (*control)(EVP_MD_CTX *ctx, int command, int p1, void *p2)" .Fc .Sh DESCRIPTION The @@ -267,11 +267,21 @@ and .Xr EVP_MD_CTX_free 3 . .Pp .Fn EVP_MD_meth_set_ctrl -sets the control function for +sets the +.Fa control +function for .Fa md . +The +.Fa control +function supplied by the application program has to return 1 to indicate +success, 0 to indicate failure, or \-1 if the +.Fa command +is not supported for this digest method. See .Xr EVP_MD_CTX_ctrl 3 -for the available controls. +for the available +.Fa command +arguments. .Sh RETURN VALUES .Fn EVP_MD_meth_new and -- 2.20.1