diff options
Diffstat (limited to 'src/lib/libcrypto/man/EVP_VerifyInit.3')
| -rw-r--r-- | src/lib/libcrypto/man/EVP_VerifyInit.3 | 195 |
1 files changed, 0 insertions, 195 deletions
diff --git a/src/lib/libcrypto/man/EVP_VerifyInit.3 b/src/lib/libcrypto/man/EVP_VerifyInit.3 deleted file mode 100644 index 5556f6c835..0000000000 --- a/src/lib/libcrypto/man/EVP_VerifyInit.3 +++ /dev/null | |||
| @@ -1,195 +0,0 @@ | |||
| 1 | .\" $OpenBSD: EVP_VerifyInit.3,v 1.10 2019/06/10 14:58:48 schwarze Exp $ | ||
| 2 | .\" full merge up to: OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
| 3 | .\" selective merge up to: OpenSSL 79b49fb0 Mar 20 10:03:10 2018 +1000 | ||
| 4 | .\" | ||
| 5 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. | ||
| 6 | .\" Copyright (c) 2000, 2001, 2006, 2016 The OpenSSL Project. | ||
| 7 | .\" All rights reserved. | ||
| 8 | .\" | ||
| 9 | .\" Redistribution and use in source and binary forms, with or without | ||
| 10 | .\" modification, are permitted provided that the following conditions | ||
| 11 | .\" are met: | ||
| 12 | .\" | ||
| 13 | .\" 1. Redistributions of source code must retain the above copyright | ||
| 14 | .\" notice, this list of conditions and the following disclaimer. | ||
| 15 | .\" | ||
| 16 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
| 17 | .\" notice, this list of conditions and the following disclaimer in | ||
| 18 | .\" the documentation and/or other materials provided with the | ||
| 19 | .\" distribution. | ||
| 20 | .\" | ||
| 21 | .\" 3. All advertising materials mentioning features or use of this | ||
| 22 | .\" software must display the following acknowledgment: | ||
| 23 | .\" "This product includes software developed by the OpenSSL Project | ||
| 24 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
| 25 | .\" | ||
| 26 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 27 | .\" endorse or promote products derived from this software without | ||
| 28 | .\" prior written permission. For written permission, please contact | ||
| 29 | .\" openssl-core@openssl.org. | ||
| 30 | .\" | ||
| 31 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
| 32 | .\" nor may "OpenSSL" appear in their names without prior written | ||
| 33 | .\" permission of the OpenSSL Project. | ||
| 34 | .\" | ||
| 35 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
| 36 | .\" acknowledgment: | ||
| 37 | .\" "This product includes software developed by the OpenSSL Project | ||
| 38 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
| 39 | .\" | ||
| 40 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 41 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 42 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 43 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 44 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 45 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 46 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 47 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 49 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 50 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 51 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 52 | .\" | ||
| 53 | .Dd $Mdocdate: June 10 2019 $ | ||
| 54 | .Dt EVP_VERIFYINIT 3 | ||
| 55 | .Os | ||
| 56 | .Sh NAME | ||
| 57 | .Nm EVP_VerifyInit_ex , | ||
| 58 | .Nm EVP_VerifyUpdate , | ||
| 59 | .Nm EVP_VerifyFinal , | ||
| 60 | .Nm EVP_VerifyInit | ||
| 61 | .Nd EVP signature verification functions | ||
| 62 | .Sh SYNOPSIS | ||
| 63 | .In openssl/evp.h | ||
| 64 | .Ft int | ||
| 65 | .Fo EVP_VerifyInit_ex | ||
| 66 | .Fa "EVP_MD_CTX *ctx" | ||
| 67 | .Fa "const EVP_MD *type" | ||
| 68 | .Fa "ENGINE *impl" | ||
| 69 | .Fc | ||
| 70 | .Ft int | ||
| 71 | .Fo EVP_VerifyUpdate | ||
| 72 | .Fa "EVP_MD_CTX *ctx" | ||
| 73 | .Fa "const void *d" | ||
| 74 | .Fa "unsigned int cnt" | ||
| 75 | .Fc | ||
| 76 | .Ft int | ||
| 77 | .Fo EVP_VerifyFinal | ||
| 78 | .Fa "EVP_MD_CTX *ctx" | ||
| 79 | .Fa "unsigned char *sigbuf" | ||
| 80 | .Fa "unsigned int siglen" | ||
| 81 | .Fa "EVP_PKEY *pkey" | ||
| 82 | .Fc | ||
| 83 | .Ft int | ||
| 84 | .Fo EVP_VerifyInit | ||
| 85 | .Fa "EVP_MD_CTX *ctx" | ||
| 86 | .Fa "const EVP_MD *type" | ||
| 87 | .Fc | ||
| 88 | .Sh DESCRIPTION | ||
| 89 | The EVP signature verification routines are a high level interface to | ||
| 90 | digital signatures. | ||
| 91 | .Pp | ||
| 92 | .Fn EVP_VerifyInit_ex | ||
| 93 | sets up a verification context | ||
| 94 | .Fa ctx | ||
| 95 | to use the digest | ||
| 96 | .Fa type | ||
| 97 | from | ||
| 98 | .Vt ENGINE | ||
| 99 | .Fa impl . | ||
| 100 | .Fa ctx | ||
| 101 | must be initialized by calling | ||
| 102 | .Xr EVP_MD_CTX_init 3 | ||
| 103 | before calling this function. | ||
| 104 | .Pp | ||
| 105 | .Fn EVP_VerifyUpdate | ||
| 106 | hashes | ||
| 107 | .Fa cnt | ||
| 108 | bytes of data at | ||
| 109 | .Fa d | ||
| 110 | into the verification context | ||
| 111 | .Fa ctx . | ||
| 112 | This function can be called several times on the same | ||
| 113 | .Fa ctx | ||
| 114 | to include additional data. | ||
| 115 | .Pp | ||
| 116 | .Fn EVP_VerifyFinal | ||
| 117 | verifies the data in | ||
| 118 | .Fa ctx | ||
| 119 | using the public key | ||
| 120 | .Fa pkey | ||
| 121 | and against the | ||
| 122 | .Fa siglen | ||
| 123 | bytes at | ||
| 124 | .Fa sigbuf . | ||
| 125 | .Pp | ||
| 126 | .Fn EVP_VerifyInit | ||
| 127 | initializes a verification context | ||
| 128 | .Fa ctx | ||
| 129 | to use the default implementation of digest | ||
| 130 | .Fa type . | ||
| 131 | .Pp | ||
| 132 | The EVP interface to digital signatures should almost always be | ||
| 133 | used in preference to the low level interfaces. | ||
| 134 | This is because the code then becomes transparent to the algorithm used | ||
| 135 | and much more flexible. | ||
| 136 | .Pp | ||
| 137 | The call to | ||
| 138 | .Fn EVP_VerifyFinal | ||
| 139 | internally finalizes a copy of the digest context. | ||
| 140 | This means that calls to | ||
| 141 | .Fn EVP_VerifyUpdate | ||
| 142 | and | ||
| 143 | .Fn EVP_VerifyFinal | ||
| 144 | can be called later to digest and verify additional data. | ||
| 145 | .Pp | ||
| 146 | Since only a copy of the digest context is ever finalized, the context | ||
| 147 | must be cleaned up after use by calling | ||
| 148 | .Xr EVP_MD_CTX_free 3 , | ||
| 149 | or a memory leak will occur. | ||
| 150 | .Sh RETURN VALUES | ||
| 151 | .Fn EVP_VerifyInit_ex | ||
| 152 | and | ||
| 153 | .Fn EVP_VerifyUpdate | ||
| 154 | return 1 for success and 0 for failure. | ||
| 155 | .Pp | ||
| 156 | .Fn EVP_VerifyFinal | ||
| 157 | returns 1 for a correct signature, 0 for failure, and -1 if some other | ||
| 158 | error occurred. | ||
| 159 | .Pp | ||
| 160 | The error codes can be obtained by | ||
| 161 | .Xr ERR_get_error 3 . | ||
| 162 | .Sh SEE ALSO | ||
| 163 | .Xr evp 3 , | ||
| 164 | .Xr EVP_DigestInit 3 , | ||
| 165 | .Xr EVP_SignInit 3 | ||
| 166 | .Sh HISTORY | ||
| 167 | .Fn EVP_VerifyInit , | ||
| 168 | .Fn EVP_VerifyUpdate , | ||
| 169 | and | ||
| 170 | .Fn EVP_VerifyFinal | ||
| 171 | first appeared in SSLeay 0.5.1 and have been available since | ||
| 172 | .Ox 2.4 . | ||
| 173 | .Pp | ||
| 174 | .Fn EVP_VerifyInit_ex | ||
| 175 | first appeared in OpenSSL 0.9.7 and has been available since | ||
| 176 | .Ox 3.2 . | ||
| 177 | .Sh BUGS | ||
| 178 | Older versions of this documentation wrongly stated that calls to | ||
| 179 | .Fn EVP_VerifyUpdate | ||
| 180 | could not be made after calling | ||
| 181 | .Fn EVP_VerifyFinal . | ||
| 182 | .Pp | ||
| 183 | Since the public key is passed in the call to | ||
| 184 | .Xr EVP_SignFinal 3 , | ||
| 185 | any error relating to the private key (for example an unsuitable key and | ||
| 186 | digest combination) will not be indicated until after potentially large | ||
| 187 | amounts of data have been passed through | ||
| 188 | .Xr EVP_SignUpdate 3 . | ||
| 189 | .Pp | ||
| 190 | It is not possible to change the signing parameters using these | ||
| 191 | functions. | ||
| 192 | .Pp | ||
| 193 | The previous two bugs are fixed in the newer functions of the | ||
| 194 | .Xr EVP_DigestVerifyInit 3 | ||
| 195 | family. | ||
