summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorschwarze <>2019-01-19 17:22:53 +0000
committerschwarze <>2019-01-19 17:22:53 +0000
commit12e291eff6acc0f9349b7628dd8082c2babc0bb7 (patch)
tree580c01b55bac28c7be680db2e702d8552eacdb2a /src
parentaf30a4b182a7bea5fcd262586eeb26283cf3fbad (diff)
downloadopenbsd-12e291eff6acc0f9349b7628dd8082c2babc0bb7.tar.gz
openbsd-12e291eff6acc0f9349b7628dd8082c2babc0bb7.tar.bz2
openbsd-12e291eff6acc0f9349b7628dd8082c2babc0bb7.zip
In evp.h rev. 1.71, tb@ added EVP_ENCODE_CTX_new(3) and
EVP_ENCODE_CTX_free(3). Docomuent them, in part using text from OpenSSL that was still published under a free license.
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/man/EVP_EncodeInit.342
1 files changed, 38 insertions, 4 deletions
diff --git a/src/lib/libcrypto/man/EVP_EncodeInit.3 b/src/lib/libcrypto/man/EVP_EncodeInit.3
index bf9ed71ac3..7c82e58eba 100644
--- a/src/lib/libcrypto/man/EVP_EncodeInit.3
+++ b/src/lib/libcrypto/man/EVP_EncodeInit.3
@@ -1,5 +1,6 @@
1.\" $OpenBSD: EVP_EncodeInit.3,v 1.4 2018/03/27 17:35:50 schwarze Exp $ 1.\" $OpenBSD: EVP_EncodeInit.3,v 1.5 2019/01/19 17:22:53 schwarze Exp $
2.\" OpenSSL f430ba31 Jun 19 19:39:01 2016 +0200 2.\" full merge up to: OpenSSL f430ba31 Jun 19 19:39:01 2016 +0200
3.\" selective merge up to: OpenSSL e9b77246 Jan 20 19:58:49 2017 +0100
3.\" 4.\"
4.\" This file was written by Matt Caswell <matt@openssl.org>. 5.\" This file was written by Matt Caswell <matt@openssl.org>.
5.\" Copyright (c) 2016 The OpenSSL Project. All rights reserved. 6.\" Copyright (c) 2016 The OpenSSL Project. All rights reserved.
@@ -48,10 +49,12 @@
48.\" 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
49.\" OF THE POSSIBILITY OF SUCH DAMAGE. 50.\" OF THE POSSIBILITY OF SUCH DAMAGE.
50.\" 51.\"
51.Dd $Mdocdate: March 27 2018 $ 52.Dd $Mdocdate: January 19 2019 $
52.Dt EVP_ENCODEINIT 3 53.Dt EVP_ENCODEINIT 3
53.Os 54.Os
54.Sh NAME 55.Sh NAME
56.Nm EVP_ENCODE_CTX_new ,
57.Nm EVP_ENCODE_CTX_free ,
55.Nm EVP_EncodeInit , 58.Nm EVP_EncodeInit ,
56.Nm EVP_EncodeUpdate , 59.Nm EVP_EncodeUpdate ,
57.Nm EVP_EncodeFinal , 60.Nm EVP_EncodeFinal ,
@@ -63,6 +66,12 @@
63.Nd EVP base64 encode/decode routines 66.Nd EVP base64 encode/decode routines
64.Sh SYNOPSIS 67.Sh SYNOPSIS
65.In openssl/evp.h 68.In openssl/evp.h
69.Ft EVP_ENCODE_CTX *
70.Fn EVP_ENCODE_CTX_new void
71.Ft void
72.Fo EVP_ENCODE_CTX_free
73.Fa "EVP_ENCODE_CTX *ctx"
74.Fc
66.Ft void 75.Ft void
67.Fo EVP_EncodeInit 76.Fo EVP_EncodeInit
68.Fa "EVP_ENCODE_CTX *ctx" 77.Fa "EVP_ENCODE_CTX *ctx"
@@ -121,6 +130,14 @@ data will be produced, plus some occasional newlines.
121If the input data length is not a multiple of 3, then the output data 130If the input data length is not a multiple of 3, then the output data
122will be padded at the end using the "=" character. 131will be padded at the end using the "=" character.
123.Pp 132.Pp
133.Fn EVP_ENCODE_CTX_new
134allocates, initializes and returns a context to be used for the encode
135and decode functions.
136.Pp
137.Fn EVP_ENCODE_CTX_free
138frees
139.Fa ctx .
140.Pp
124Encoding of binary data is performed in blocks of 48 input bytes (or 141Encoding of binary data is performed in blocks of 48 input bytes (or
125less for the final block). 142less for the final block).
126For each 48-byte input block encoded, 64 bytes of base64 data is output, 143For each 48-byte input block encoded, 64 bytes of base64 data is output,
@@ -275,6 +292,13 @@ The output will be padded with 0 bits if necessary to ensure that the
275output is always 3 bytes for every 4 input bytes. 292output is always 3 bytes for every 4 input bytes.
276This function will return the length of the data decoded or -1 on error. 293This function will return the length of the data decoded or -1 on error.
277.Sh RETURN VALUES 294.Sh RETURN VALUES
295.Fn EVP_ENCODE_CTX_new
296returns a pointer to the newly allocated
297.Vt EVP_ENCODE_CTX
298object or
299.Dv NULL
300on error.
301.Pp
278.Fn EVP_EncodeUpdate 302.Fn EVP_EncodeUpdate
279returns 0 on error or 1 on success. 303returns 0 on error or 1 on success.
280.Pp 304.Pp
@@ -294,6 +318,16 @@ returns the length of the data decoded or -1 on error.
294.Sh SEE ALSO 318.Sh SEE ALSO
295.Xr evp 3 319.Xr evp 3
296.Sh HISTORY 320.Sh HISTORY
297These functions first appeared in SSLeay 0.5.1 321The
322.Fn EVP_Encode*
323and
324.Fn EVP_Decode*
325functions first appeared in SSLeay 0.5.1
298and have been available since 326and have been available since
299.Ox 2.4 . 327.Ox 2.4 .
328.Pp
329.Fn EVP_ENCODE_CTX_new
330and
331.Fn EVP_ENCODE_CTX_free
332first appered in OpenSSL 1.1.0 and have been available since
333.Ox 6.5 .