diff options
| author | schwarze <> | 2016-11-27 15:58:47 +0000 |
|---|---|---|
| committer | schwarze <> | 2016-11-27 15:58:47 +0000 |
| commit | 36c2ec0b840fed5c19cdaa2801a2303e35adcdbc (patch) | |
| tree | f4215e3b8b7f280b8206976505d14f1267d5a95a | |
| parent | 02bdd652e4b51bf1d37f21205035107e62a0cc53 (diff) | |
| download | openbsd-36c2ec0b840fed5c19cdaa2801a2303e35adcdbc.tar.gz openbsd-36c2ec0b840fed5c19cdaa2801a2303e35adcdbc.tar.bz2 openbsd-36c2ec0b840fed5c19cdaa2801a2303e35adcdbc.zip | |
Add Copyright and license.
Fix a typo in the NAME section.
Document HMAC_CTX_copy(3), HMAC_CTX_set_flags(3), HMAC_size(3), from OpenSSL.
Drop the uselesss statement that void functions do not return values.
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/man/HMAC.3 | 97 |
1 files changed, 88 insertions, 9 deletions
diff --git a/src/lib/libcrypto/man/HMAC.3 b/src/lib/libcrypto/man/HMAC.3 index 488a33fa80..d4de25809f 100644 --- a/src/lib/libcrypto/man/HMAC.3 +++ b/src/lib/libcrypto/man/HMAC.3 | |||
| @@ -1,11 +1,60 @@ | |||
| 1 | .\" $OpenBSD: HMAC.3,v 1.3 2016/11/22 21:38:18 jmc Exp $ | 1 | .\" $OpenBSD: HMAC.3,v 1.4 2016/11/27 15:58:47 schwarze Exp $ |
| 2 | .\" OpenSSL a528d4f0 Oct 27 13:40:11 2015 -0400 | ||
| 2 | .\" | 3 | .\" |
| 3 | .Dd $Mdocdate: November 22 2016 $ | 4 | .\" This file was written by Ulf Moeller <ulf@openssl.org>. |
| 5 | .\" Copyright (c) 2000-2002, 2006, 2008, 2009, 2013, 2016 The OpenSSL Project. | ||
| 6 | .\" All rights reserved. | ||
| 7 | .\" | ||
| 8 | .\" Redistribution and use in source and binary forms, with or without | ||
| 9 | .\" modification, are permitted provided that the following conditions | ||
| 10 | .\" are met: | ||
| 11 | .\" | ||
| 12 | .\" 1. Redistributions of source code must retain the above copyright | ||
| 13 | .\" notice, this list of conditions and the following disclaimer. | ||
| 14 | .\" | ||
| 15 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | .\" notice, this list of conditions and the following disclaimer in | ||
| 17 | .\" the documentation and/or other materials provided with the | ||
| 18 | .\" distribution. | ||
| 19 | .\" | ||
| 20 | .\" 3. All advertising materials mentioning features or use of this | ||
| 21 | .\" software must display the following acknowledgment: | ||
| 22 | .\" "This product includes software developed by the OpenSSL Project | ||
| 23 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
| 24 | .\" | ||
| 25 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | .\" endorse or promote products derived from this software without | ||
| 27 | .\" prior written permission. For written permission, please contact | ||
| 28 | .\" openssl-core@openssl.org. | ||
| 29 | .\" | ||
| 30 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | .\" nor may "OpenSSL" appear in their names without prior written | ||
| 32 | .\" permission of the OpenSSL Project. | ||
| 33 | .\" | ||
| 34 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | .\" acknowledgment: | ||
| 36 | .\" "This product includes software developed by the OpenSSL Project | ||
| 37 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
| 38 | .\" | ||
| 39 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | .\" | ||
| 52 | .Dd $Mdocdate: November 27 2016 $ | ||
| 4 | .Dt HMAC 3 | 53 | .Dt HMAC 3 |
| 5 | .Os | 54 | .Os |
| 6 | .Sh NAME | 55 | .Sh NAME |
| 7 | .Nm HMAC , | 56 | .Nm HMAC , |
| 8 | .Nm HMAC_CTX_Init , | 57 | .Nm HMAC_CTX_init , |
| 9 | .Nm HMAC_Init , | 58 | .Nm HMAC_Init , |
| 10 | .Nm HMAC_Init_ex , | 59 | .Nm HMAC_Init_ex , |
| 11 | .Nm HMAC_Update , | 60 | .Nm HMAC_Update , |
| @@ -64,6 +113,20 @@ | |||
| 64 | .Fo HMAC_cleanup | 113 | .Fo HMAC_cleanup |
| 65 | .Fa "HMAC_CTX *ctx" | 114 | .Fa "HMAC_CTX *ctx" |
| 66 | .Fc | 115 | .Fc |
| 116 | .Ft int | ||
| 117 | .Fo HMAC_CTX_copy | ||
| 118 | .Fa "HMAC_CTX *dctx" | ||
| 119 | .Fa "HMAC_CTX *sctx" | ||
| 120 | .Fc | ||
| 121 | .Ft void | ||
| 122 | .Fo HMAC_CTX_set_flags | ||
| 123 | .Fa "HMAC_CTX *ctx" | ||
| 124 | .Fa "unsigned long flags" | ||
| 125 | .Fc | ||
| 126 | .Ft size_t | ||
| 127 | .Fo HMAC_size | ||
| 128 | .Fa "const HMAC_CTX *e" | ||
| 129 | .Fc | ||
| 67 | .Sh DESCRIPTION | 130 | .Sh DESCRIPTION |
| 68 | HMAC is a MAC (message authentication code), i.e. a keyed hash | 131 | HMAC is a MAC (message authentication code), i.e. a keyed hash |
| 69 | function used for message authentication, which is based on a hash | 132 | function used for message authentication, which is based on a hash |
| @@ -122,7 +185,7 @@ is no longer required. | |||
| 122 | is an alias for | 185 | is an alias for |
| 123 | .Fn HMAC_CTX_cleanup | 186 | .Fn HMAC_CTX_cleanup |
| 124 | included for backward compatibility with 0.9.6b. | 187 | included for backward compatibility with 0.9.6b. |
| 125 | It is deprecated. | 188 | It is deprecated and implemented as a macro. |
| 126 | .Pp | 189 | .Pp |
| 127 | The following functions may be used if the message is not completely | 190 | The following functions may be used if the message is not completely |
| 128 | stored in memory: | 191 | stored in memory: |
| @@ -169,6 +232,22 @@ can be called repeatedly with chunks of the message to be authenticated | |||
| 169 | places the message authentication code in | 232 | places the message authentication code in |
| 170 | .Fa md , | 233 | .Fa md , |
| 171 | which must have space for the hash function output. | 234 | which must have space for the hash function output. |
| 235 | .Pp | ||
| 236 | .Fn HMAC_CTX_copy | ||
| 237 | copies all of the internal state from | ||
| 238 | .Fa sctx | ||
| 239 | into | ||
| 240 | .Fa dctx . | ||
| 241 | .Pp | ||
| 242 | .Fn HMAC_CTX_set_flags | ||
| 243 | applies the specified flags to the internal | ||
| 244 | .Vt EVP_MD_CTX Ns s. | ||
| 245 | These flags have the same meaning as for | ||
| 246 | .Xr EVP_MD_CTX_set_flags 3 . | ||
| 247 | .Pp | ||
| 248 | .Fn HMAC_size | ||
| 249 | returns the length in bytes of the underlying hash function output. | ||
| 250 | It is implemented as a macro. | ||
| 172 | .Sh RETURN VALUES | 251 | .Sh RETURN VALUES |
| 173 | .Fn HMAC | 252 | .Fn HMAC |
| 174 | returns a pointer to the message authentication code or | 253 | returns a pointer to the message authentication code or |
| @@ -177,14 +256,14 @@ if an error occurred. | |||
| 177 | .Pp | 256 | .Pp |
| 178 | .Fn HMAC_Init_ex , | 257 | .Fn HMAC_Init_ex , |
| 179 | .Fn HMAC_Update , | 258 | .Fn HMAC_Update , |
| 259 | .Fn HMAC_Final , | ||
| 180 | and | 260 | and |
| 181 | .Fn HMAC_Final | 261 | .Fn HMAC_CTX_copy |
| 182 | return 1 for success or 0 if an error occurred. | 262 | return 1 for success or 0 if an error occurred. |
| 183 | .Pp | 263 | .Pp |
| 184 | .Fn HMAC_CTX_init | 264 | .Fn HMAC_size |
| 185 | and | 265 | returns the length in bytes of the underlying hash function output |
| 186 | .Fn HMAC_CTX_cleanup | 266 | or 0 on error. |
| 187 | do not return values. | ||
| 188 | .Sh SEE ALSO | 267 | .Sh SEE ALSO |
| 189 | .Xr evp 3 | 268 | .Xr evp 3 |
| 190 | .Sh STANDARDS | 269 | .Sh STANDARDS |
