diff options
| author | cvs2svn <admin@example.com> | 2021-08-18 16:06:57 +0000 |
|---|---|---|
| committer | cvs2svn <admin@example.com> | 2021-08-18 16:06:57 +0000 |
| commit | d56c8fa8260d226f98b26f017b45b9c2b135f38d (patch) | |
| tree | 348178b41617813cc93787187984a734ef8379ca /src/lib/libcrypto/man/BIO_f_base64.3 | |
| parent | 18b9c1bcab7c37d8c5bd05b8e0d14d0c59d96650 (diff) | |
| download | openbsd-tb_20210818.tar.gz openbsd-tb_20210818.tar.bz2 openbsd-tb_20210818.zip | |
This commit was manufactured by cvs2git to create tag 'tb_20210818'.tb_20210818
Diffstat (limited to 'src/lib/libcrypto/man/BIO_f_base64.3')
| -rw-r--r-- | src/lib/libcrypto/man/BIO_f_base64.3 | 135 |
1 files changed, 0 insertions, 135 deletions
diff --git a/src/lib/libcrypto/man/BIO_f_base64.3 b/src/lib/libcrypto/man/BIO_f_base64.3 deleted file mode 100644 index 68265b6c9e..0000000000 --- a/src/lib/libcrypto/man/BIO_f_base64.3 +++ /dev/null | |||
| @@ -1,135 +0,0 @@ | |||
| 1 | .\" $OpenBSD: BIO_f_base64.3,v 1.11 2019/06/06 01:06:58 schwarze Exp $ | ||
| 2 | .\" OpenSSL fc1d88f0 Wed Jul 2 22:42:40 2014 -0400 | ||
| 3 | .\" | ||
| 4 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. | ||
| 5 | .\" Copyright (c) 2000, 2003, 2005, 2014 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: June 6 2019 $ | ||
| 53 | .Dt BIO_F_BASE64 3 | ||
| 54 | .Os | ||
| 55 | .Sh NAME | ||
| 56 | .Nm BIO_f_base64 | ||
| 57 | .Nd base64 BIO filter | ||
| 58 | .Sh SYNOPSIS | ||
| 59 | .In openssl/bio.h | ||
| 60 | .In openssl/evp.h | ||
| 61 | .Ft const BIO_METHOD * | ||
| 62 | .Fo BIO_f_base64 | ||
| 63 | .Fa void | ||
| 64 | .Fc | ||
| 65 | .Sh DESCRIPTION | ||
| 66 | .Fn BIO_f_base64 | ||
| 67 | returns the base64 BIO method. | ||
| 68 | This is a filter BIO that base64 encodes any data written through it | ||
| 69 | and decodes any data read through it. | ||
| 70 | .Pp | ||
| 71 | Base64 BIOs do not support | ||
| 72 | .Xr BIO_gets 3 | ||
| 73 | or | ||
| 74 | .Xr BIO_puts 3 . | ||
| 75 | .Pp | ||
| 76 | .Xr BIO_flush 3 | ||
| 77 | on a base64 BIO that is being written through | ||
| 78 | is used to signal that no more data is to be encoded: | ||
| 79 | this is used to flush the final block through the BIO. | ||
| 80 | .Pp | ||
| 81 | To encode the data all on one line and to expect the data to be all | ||
| 82 | on one line, initialize the base64 BIO as follows: | ||
| 83 | .Bd -literal -offset indent | ||
| 84 | BIO *b64 = BIO_new(BIO_f_base64()); | ||
| 85 | BIO_set_flags(b64, BIO_FLAGS_BASE64_NO_NL); | ||
| 86 | .Ed | ||
| 87 | .Sh RETURN VALUES | ||
| 88 | .Fn BIO_f_base64 | ||
| 89 | returns the base64 BIO method. | ||
| 90 | .Sh EXAMPLES | ||
| 91 | Base64 encode the string "Hello World\en" | ||
| 92 | and write the result to standard output: | ||
| 93 | .Bd -literal -offset indent | ||
| 94 | BIO *bio, *b64; | ||
| 95 | char message[] = "Hello World \en"; | ||
| 96 | |||
| 97 | b64 = BIO_new(BIO_f_base64()); | ||
| 98 | bio = BIO_new_fp(stdout, BIO_NOCLOSE); | ||
| 99 | BIO_push(b64, bio); | ||
| 100 | BIO_write(b64, message, strlen(message)); | ||
| 101 | BIO_flush(b64); | ||
| 102 | |||
| 103 | BIO_free_all(b64); | ||
| 104 | .Ed | ||
| 105 | .Pp | ||
| 106 | Read Base64-encoded data from standard input | ||
| 107 | and write the decoded data to standard output: | ||
| 108 | .Bd -literal -offset indent | ||
| 109 | BIO *bio, *b64, *bio_out; | ||
| 110 | char inbuf[512]; | ||
| 111 | int inlen; | ||
| 112 | |||
| 113 | b64 = BIO_new(BIO_f_base64()); | ||
| 114 | bio = BIO_new_fp(stdin, BIO_NOCLOSE); | ||
| 115 | bio_out = BIO_new_fp(stdout, BIO_NOCLOSE); | ||
| 116 | BIO_push(b64, bio); | ||
| 117 | while((inlen = BIO_read(b64, inbuf, 512)) > 0) | ||
| 118 | BIO_write(bio_out, inbuf, inlen); | ||
| 119 | |||
| 120 | BIO_flush(bio_out); | ||
| 121 | BIO_free_all(b64); | ||
| 122 | .Ed | ||
| 123 | .Sh SEE ALSO | ||
| 124 | .Xr BIO_new 3 , | ||
| 125 | .Xr EVP_EncodeInit 3 | ||
| 126 | .Sh HISTORY | ||
| 127 | .Fn BIO_f_base64 | ||
| 128 | first appeared in SSLeay 0.6.5 and has been available since | ||
| 129 | .Ox 2.4 . | ||
| 130 | .Sh BUGS | ||
| 131 | The ambiguity of EOF in base64-encoded data can cause additional | ||
| 132 | data following the base64-encoded block to be misinterpreted. | ||
| 133 | .Pp | ||
| 134 | There should be some way of specifying a test that the BIO can perform | ||
| 135 | to reliably determine EOF (for example a MIME boundary). | ||
