summaryrefslogtreecommitdiff
path: root/lib/libcrypto/man
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2016-11-26 17:12:46 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2016-11-26 17:12:46 +0000
commitaebb2a32ac84706468f066fe20c1803334328b27 (patch)
tree01afd2122db7e133f3df540b7159a5ad9ea489b3 /lib/libcrypto/man
parent177addc2dd991c687716d101849170be403dbe1f (diff)
Add Copyright and license.
In the SYNOPSIS, show prototypes rather than #defines.
Diffstat (limited to 'lib/libcrypto/man')
-rw-r--r--lib/libcrypto/man/EVP_DigestInit.386
1 files changed, 79 insertions, 7 deletions
diff --git a/lib/libcrypto/man/EVP_DigestInit.3 b/lib/libcrypto/man/EVP_DigestInit.3
index 353084435f0..2100065bf82 100644
--- a/lib/libcrypto/man/EVP_DigestInit.3
+++ b/lib/libcrypto/man/EVP_DigestInit.3
@@ -1,6 +1,55 @@
-.\" $OpenBSD: EVP_DigestInit.3,v 1.3 2016/11/21 22:19:15 jmc Exp $
+.\" $OpenBSD: EVP_DigestInit.3,v 1.4 2016/11/26 17:12:45 schwarze Exp $
+.\" OpenSSL 7f572e95 Dec 2 13:57:04 2015 +0000
.\"
-.Dd $Mdocdate: November 21 2016 $
+.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
+.\" Copyright (c) 2000-2004, 2009, 2012-2015 The OpenSSL Project.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\"
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\"
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in
+.\" the documentation and/or other materials provided with the
+.\" distribution.
+.\"
+.\" 3. All advertising materials mentioning features or use of this
+.\" software must display the following acknowledgment:
+.\" "This product includes software developed by the OpenSSL Project
+.\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
+.\"
+.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For written permission, please contact
+.\" openssl-core@openssl.org.
+.\"
+.\" 5. Products derived from this software may not be called "OpenSSL"
+.\" nor may "OpenSSL" appear in their names without prior written
+.\" permission of the OpenSSL Project.
+.\"
+.\" 6. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by the OpenSSL Project
+.\" for use in the OpenSSL Toolkit (http://www.openssl.org/)"
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
+.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
+.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+.\" OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd $Mdocdate: November 26 2016 $
.Dt EVP_DIGESTINIT 3
.Os
.Sh NAME
@@ -115,9 +164,18 @@
.Fo EVP_MD_CTX_md
.Fa "const EVP_MD_CTX *ctx"
.Fc
-.Fd #define EVP_MD_CTX_size(e) EVP_MD_size(EVP_MD_CTX_md(e))
-.Fd #define EVP_MD_CTX_block_size(e) EVP_MD_block_size((e)->digest)
-.Fd #define EVP_MD_CTX_type(e) EVP_MD_type((e)->digest)
+.Ft int
+.Fo EVP_MD_CTX_size
+.Fa "const EVP_MD *ctx"
+.Fc
+.Ft int
+.Fo EVP_MD_CTX_block_size
+.Fa "const EVP_MD *ctx"
+.Fc
+.Ft int
+.Fo EVP_MD_CTX_type
+.Fa "const EVP_MD *ctx"
+.Fc
.Ft const EVP_MD *
.Fn EVP_md_null void
.Ft const EVP_MD *
@@ -144,8 +202,14 @@
.Fo EVP_get_digestbyname
.Fa "const char *name"
.Fc
-.Fd #define EVP_get_digestbynid(a) EVP_get_digestbyname(OBJ_nid2sn(a))
-.Fd #define EVP_get_digestbyobj(a) EVP_get_digestbynid(OBJ_obj2nid(a))
+.Ft const EVP_MD *
+.Fo EVP_get_digestbynid
+.Fa "int type"
+.Fc
+.Ft const EVP_MD *
+.Fo EVP_get_digestbyobj
+.Fa "const ASN1_OBJECT *o"
+.Fc
.Sh DESCRIPTION
The EVP digest routines are a high level interface to message digests.
.Pp
@@ -342,6 +406,14 @@ The digest table must be initialized using, for example,
.Xr OpenSSL_add_all_digests 3
for these functions to work.
.Pp
+.Fn EVP_MD_CTX_size ,
+.Fn EVP_MD_CTX_block_size ,
+.Fn EVP_MD_CTX_type ,
+.Fn EVP_get_digestbynid ,
+and
+.Fn EVP_get_digestbyobj
+are implemented as macros.
+.Pp
The EVP interface to message digests should almost always be used
in preference to the low level interfaces.
This is because the code then becomes transparent to the digest used and