diff options
| author | schwarze <> | 2023-08-26 15:12:04 +0000 |
|---|---|---|
| committer | schwarze <> | 2023-08-26 15:12:04 +0000 |
| commit | 693e666182065ae33f7c13986a8fa11deec65891 (patch) | |
| tree | 19010d03955f900b9ddced5d62782161b8d1bbe3 /src | |
| parent | 862e1f16dafa5c72eec7c36dbe186b259012ffe7 (diff) | |
| download | openbsd-693e666182065ae33f7c13986a8fa11deec65891.tar.gz openbsd-693e666182065ae33f7c13986a8fa11deec65891.tar.bz2 openbsd-693e666182065ae33f7c13986a8fa11deec65891.zip | |
Write documentation for EVP_CIPHER_CTX_buf_noconst(3) from scratch.
Put it here rather than into EVP_EncryptInit(3) because similar to
EVP_CIPHER_CTX_get_cipher_data(3), application software should not
use it. These functions will likely not be needed except by people
implementing custom encryption algorithms.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/man/EVP_CIPHER_CTX_get_cipher_data.3 | 47 |
1 files changed, 42 insertions, 5 deletions
diff --git a/src/lib/libcrypto/man/EVP_CIPHER_CTX_get_cipher_data.3 b/src/lib/libcrypto/man/EVP_CIPHER_CTX_get_cipher_data.3 index e60e1fb30e..4f75c8b008 100644 --- a/src/lib/libcrypto/man/EVP_CIPHER_CTX_get_cipher_data.3 +++ b/src/lib/libcrypto/man/EVP_CIPHER_CTX_get_cipher_data.3 | |||
| @@ -1,7 +1,24 @@ | |||
| 1 | .\" $OpenBSD: EVP_CIPHER_CTX_get_cipher_data.3,v 1.2 2023/08/26 06:19:09 jsg Exp $ | 1 | .\" $OpenBSD: EVP_CIPHER_CTX_get_cipher_data.3,v 1.3 2023/08/26 15:12:04 schwarze Exp $ |
| 2 | .\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 | 2 | .\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 |
| 3 | .\" | 3 | .\" |
| 4 | .\" This file was written by Matt Caswell <matt@openssl.org> | 4 | .\" This file is a derived work. |
| 5 | .\" The changes are covered by the following Copyright and license: | ||
| 6 | .\" | ||
| 7 | .\" Copyright (c) 2023 Ingo Schwarze <schwarze@openbsd.org> | ||
| 8 | .\" | ||
| 9 | .\" Permission to use, copy, modify, and distribute this software for any | ||
| 10 | .\" purpose with or without fee is hereby granted, provided that the above | ||
| 11 | .\" copyright notice and this permission notice appear in all copies. | ||
| 12 | .\" | ||
| 13 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 14 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 15 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 16 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 17 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 18 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 19 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 20 | .\" | ||
| 21 | .\" The original file was written by Matt Caswell <matt@openssl.org>. | ||
| 5 | .\" Copyright (c) 2016 The OpenSSL Project. All rights reserved. | 22 | .\" Copyright (c) 2016 The OpenSSL Project. All rights reserved. |
| 6 | .\" | 23 | .\" |
| 7 | .\" Redistribution and use in source and binary forms, with or without | 24 | .\" Redistribution and use in source and binary forms, with or without |
| @@ -53,7 +70,8 @@ | |||
| 53 | .Os | 70 | .Os |
| 54 | .Sh NAME | 71 | .Sh NAME |
| 55 | .Nm EVP_CIPHER_CTX_get_cipher_data , | 72 | .Nm EVP_CIPHER_CTX_get_cipher_data , |
| 56 | .Nm EVP_CIPHER_CTX_set_cipher_data | 73 | .Nm EVP_CIPHER_CTX_set_cipher_data , |
| 74 | .Nm EVP_CIPHER_CTX_buf_noconst | ||
| 57 | .Nd inspect and modify EVP_CIPHER_CTX objects | 75 | .Nd inspect and modify EVP_CIPHER_CTX objects |
| 58 | .Sh SYNOPSIS | 76 | .Sh SYNOPSIS |
| 59 | .In openssl/evp.h | 77 | .In openssl/evp.h |
| @@ -66,6 +84,10 @@ | |||
| 66 | .Fa "EVP_CIPHER_CTX *ctx" | 84 | .Fa "EVP_CIPHER_CTX *ctx" |
| 67 | .Fa "void *cipher_data" | 85 | .Fa "void *cipher_data" |
| 68 | .Fc | 86 | .Fc |
| 87 | .Ft unsigned char * | ||
| 88 | .Fo EVP_CIPHER_CTX_buf_noconst | ||
| 89 | .Fa "EVP_CIPHER_CTX *ctx" | ||
| 90 | .Fc | ||
| 69 | .Sh DESCRIPTION | 91 | .Sh DESCRIPTION |
| 70 | .Fn EVP_CIPHER_CTX_get_cipher_data | 92 | .Fn EVP_CIPHER_CTX_get_cipher_data |
| 71 | returns a pointer to the cipher data of | 93 | returns a pointer to the cipher data of |
| @@ -89,6 +111,15 @@ A pointer to any existing cipher data is returned from this function. | |||
| 89 | If the old data is no longer required, | 111 | If the old data is no longer required, |
| 90 | it should be freed through a call to | 112 | it should be freed through a call to |
| 91 | .Xr free 3 . | 113 | .Xr free 3 . |
| 114 | .Pp | ||
| 115 | .Fn EVP_CIPHER_CTX_buf_noconst | ||
| 116 | provides engines and custom cipher implementations | ||
| 117 | with access to the internal buffer that | ||
| 118 | .Xr EVP_EncryptUpdate 3 | ||
| 119 | copies input data into before encrypting it. | ||
| 120 | This function can for example be used | ||
| 121 | inside callback functions installed with | ||
| 122 | .Xr EVP_CIPHER_meth_set_do_cipher 3 . | ||
| 92 | .Sh RETURN VALUES | 123 | .Sh RETURN VALUES |
| 93 | .Fn EVP_CIPHER_CTX_get_cipher_data | 124 | .Fn EVP_CIPHER_CTX_get_cipher_data |
| 94 | returns an internal pointer owned by | 125 | returns an internal pointer owned by |
| @@ -98,12 +129,18 @@ returns an internal pointer owned by | |||
| 98 | returns a pointer to the old cipher data of | 129 | returns a pointer to the old cipher data of |
| 99 | .Fa ctx | 130 | .Fa ctx |
| 100 | and transfers ownership to the caller. | 131 | and transfers ownership to the caller. |
| 132 | .Pp | ||
| 133 | .Fn EVP_CIPHER_CTX_buf_noconst | ||
| 134 | returns a pointer to an internal buffer owned by | ||
| 135 | .Fa ctx . | ||
| 101 | .Sh SEE ALSO | 136 | .Sh SEE ALSO |
| 102 | .Xr evp 3 , | 137 | .Xr evp 3 , |
| 138 | .Xr EVP_CIPHER_meth_new 3 , | ||
| 103 | .Xr EVP_EncryptInit 3 | 139 | .Xr EVP_EncryptInit 3 |
| 104 | .Sh HISTORY | 140 | .Sh HISTORY |
| 105 | .Fn EVP_CIPHER_CTX_get_cipher_data | 141 | .Fn EVP_CIPHER_CTX_get_cipher_data , |
| 142 | .Fn EVP_CIPHER_CTX_set_cipher_data , | ||
| 106 | and | 143 | and |
| 107 | .Fn EVP_CIPHER_CTX_set_cipher_data | 144 | .Fn EVP_CIPHER_CTX_buf_noconst |
| 108 | first appeared in OpenSSL 1.1.0 and have been available since | 145 | first appeared in OpenSSL 1.1.0 and have been available since |
| 109 | .Ox 7.1 . | 146 | .Ox 7.1 . |
