diff options
| author | tb <> | 2021-05-11 15:14:56 +0000 |
|---|---|---|
| committer | tb <> | 2021-05-11 15:14:56 +0000 |
| commit | a7740c128130b1e746a8d1c2b3b7927d57c8ff00 (patch) | |
| tree | fe9ff01999ab24680f2d6b8866ed30bfd1ad8c9e /src/lib/libcrypto/man | |
| parent | 7115f063c5edad457ff0e7693ccbd5949a8e4b32 (diff) | |
| download | openbsd-a7740c128130b1e746a8d1c2b3b7927d57c8ff00.tar.gz openbsd-a7740c128130b1e746a8d1c2b3b7927d57c8ff00.tar.bz2 openbsd-a7740c128130b1e746a8d1c2b3b7927d57c8ff00.zip | |
Merge documentation for EVP_DigestSign from OpenSSL 1.1.1.
Diffstat (limited to 'src/lib/libcrypto/man')
| -rw-r--r-- | src/lib/libcrypto/man/EVP_DigestSignInit.3 | 43 |
1 files changed, 39 insertions, 4 deletions
diff --git a/src/lib/libcrypto/man/EVP_DigestSignInit.3 b/src/lib/libcrypto/man/EVP_DigestSignInit.3 index 4d12e9f3c4..8f5f99f940 100644 --- a/src/lib/libcrypto/man/EVP_DigestSignInit.3 +++ b/src/lib/libcrypto/man/EVP_DigestSignInit.3 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .\" $OpenBSD: EVP_DigestSignInit.3,v 1.7 2019/06/10 14:58:48 schwarze Exp $ | 1 | .\" $OpenBSD: EVP_DigestSignInit.3,v 1.8 2021/05/11 15:14:56 tb Exp $ |
| 2 | .\" OpenSSL 9b86974e Aug 17 15:21:33 2015 -0400 | 2 | .\" OpenSSL 9b86974e Aug 17 15:21:33 2015 -0400 |
| 3 | .\" | 3 | .\" |
| 4 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. | 4 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. |
| @@ -49,13 +49,14 @@ | |||
| 49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
| 50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
| 51 | .\" | 51 | .\" |
| 52 | .Dd $Mdocdate: June 10 2019 $ | 52 | .Dd $Mdocdate: May 11 2021 $ |
| 53 | .Dt EVP_DIGESTSIGNINIT 3 | 53 | .Dt EVP_DIGESTSIGNINIT 3 |
| 54 | .Os | 54 | .Os |
| 55 | .Sh NAME | 55 | .Sh NAME |
| 56 | .Nm EVP_DigestSignInit , | 56 | .Nm EVP_DigestSignInit , |
| 57 | .Nm EVP_DigestSignUpdate , | 57 | .Nm EVP_DigestSignUpdate , |
| 58 | .Nm EVP_DigestSignFinal | 58 | .Nm EVP_DigestSignFinal , |
| 59 | .Nm EVP_DigestSign | ||
| 59 | .Nd EVP signing functions | 60 | .Nd EVP signing functions |
| 60 | .Sh SYNOPSIS | 61 | .Sh SYNOPSIS |
| 61 | .In openssl/evp.h | 62 | .In openssl/evp.h |
| @@ -79,6 +80,14 @@ | |||
| 79 | .Fa "unsigned char *sig" | 80 | .Fa "unsigned char *sig" |
| 80 | .Fa "size_t *siglen" | 81 | .Fa "size_t *siglen" |
| 81 | .Fc | 82 | .Fc |
| 83 | .Ft int | ||
| 84 | .Fo EVP_DigestSign | ||
| 85 | .Fa "EVP_MD_CTX *ctx" | ||
| 86 | .Fa "unsigned char *sigret" | ||
| 87 | .Fa "size_t *siglen" | ||
| 88 | .Fa "const unsigned char *tbs" | ||
| 89 | .Fa "size_t tbslen" | ||
| 90 | .Fc | ||
| 82 | .Sh DESCRIPTION | 91 | .Sh DESCRIPTION |
| 83 | The EVP signature routines are a high level interface to digital | 92 | The EVP signature routines are a high level interface to digital |
| 84 | signatures. | 93 | signatures. |
| @@ -144,6 +153,28 @@ If the call is successful, the signature is written to | |||
| 144 | and the amount of data written to | 153 | and the amount of data written to |
| 145 | .Fa siglen . | 154 | .Fa siglen . |
| 146 | .Pp | 155 | .Pp |
| 156 | .Fn EVP_DigestSign | ||
| 157 | signs | ||
| 158 | .Fa tbslen | ||
| 159 | bytes of data at | ||
| 160 | .Fa tbs | ||
| 161 | and places the signature in | ||
| 162 | .Fa sigret | ||
| 163 | and its length in | ||
| 164 | .Fa siglen | ||
| 165 | in a similar way to | ||
| 166 | .Fn EVP_DigestSignFinal . | ||
| 167 | .Fn EVP_DigestSign | ||
| 168 | is a one shot operation which signs a single block of data | ||
| 169 | with one function call. | ||
| 170 | For algorithms that support streaming it is equivalent to calling | ||
| 171 | .Fn EVP_DigestSignUpdate | ||
| 172 | and | ||
| 173 | .Fn EVP_DigestSignFinal . | ||
| 174 | .\" For algorithms which do not support streaming | ||
| 175 | .\" (e.g. PureEdDSA) | ||
| 176 | .\" it is the only way to sign data. | ||
| 177 | .Pp | ||
| 147 | The EVP interface to digital signatures should almost always be | 178 | The EVP interface to digital signatures should almost always be |
| 148 | used in preference to the low level interfaces. | 179 | used in preference to the low level interfaces. |
| 149 | This is because the code then becomes transparent to the algorithm used | 180 | This is because the code then becomes transparent to the algorithm used |
| @@ -182,8 +213,9 @@ signature for any set of parameters. | |||
| 182 | .Sh RETURN VALUES | 213 | .Sh RETURN VALUES |
| 183 | .Fn EVP_DigestSignInit , | 214 | .Fn EVP_DigestSignInit , |
| 184 | .Fn EVP_DigestSignUpdate , | 215 | .Fn EVP_DigestSignUpdate , |
| 216 | .Fn EVP_DigestSignFinal , | ||
| 185 | and | 217 | and |
| 186 | .Fn EVP_DigestSignFinal | 218 | .Fn EVP_DigestSign |
| 187 | return 1 for success and 0 or a negative value for failure. | 219 | return 1 for success and 0 or a negative value for failure. |
| 188 | In particular, a return value of -2 indicates the operation is not | 220 | In particular, a return value of -2 indicates the operation is not |
| 189 | supported by the public key algorithm. | 221 | supported by the public key algorithm. |
| @@ -202,3 +234,6 @@ and | |||
| 202 | .Fn EVP_DigestSignFinal | 234 | .Fn EVP_DigestSignFinal |
| 203 | first appeared in OpenSSL 1.0.0 and have been available since | 235 | first appeared in OpenSSL 1.0.0 and have been available since |
| 204 | .Ox 4.9 . | 236 | .Ox 4.9 . |
| 237 | .Fn EVP_DigestSign | ||
| 238 | first appeared in OpenSSL 1.1.1 and has been available since | ||
| 239 | .Ox 7.0 . | ||
