X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=doc%2Fcrypto%2FBIO_f_base64.pod;h=19df1dd638144db59387bd8bc2637fa3a8fa2d96;hp=929557d22f026cf8eb15426884f9f86f9fc70364;hb=0e74d7ca440a3a7fbb7ddd6873e2f494d87f8d0e;hpb=c2dac35a02e47010b3dc501f07e31287cc3e252e diff --git a/doc/crypto/BIO_f_base64.pod b/doc/crypto/BIO_f_base64.pod index 929557d22f..19df1dd638 100644 --- a/doc/crypto/BIO_f_base64.pod +++ b/doc/crypto/BIO_f_base64.pod @@ -4,12 +4,14 @@ BIO_f_base64 - base64 BIO filter +=for comment multiple includes + =head1 SYNOPSIS #include #include - BIO_METHOD * BIO_f_base64(void); + const BIO_METHOD *BIO_f_base64(void); =head1 DESCRIPTION @@ -17,7 +19,7 @@ BIO_f_base64() returns the base64 BIO method. This is a filter BIO that base64 encodes any data written through it and decodes any data read through it. -Base64 BIOs do not support BIO_gets() or BIO_puts(). +Base64 BIOs do not support BIO_gets() or BIO_puts(). BIO_flush() on a base64 BIO that is being written through is used to signal that no more data is to be encoded: this is used @@ -46,11 +48,11 @@ to standard output: b64 = BIO_new(BIO_f_base64()); bio = BIO_new_fp(stdout, BIO_NOCLOSE); - bio = BIO_push(b64, bio); - BIO_write(bio, message, strlen(message)); - BIO_flush(bio); + BIO_push(b64, bio); + BIO_write(b64, message, strlen(message)); + BIO_flush(b64); - BIO_free_all(bio); + BIO_free_all(b64); Read Base64 encoded data from standard input and write the decoded data to standard output: @@ -62,11 +64,12 @@ data to standard output: b64 = BIO_new(BIO_f_base64()); bio = BIO_new_fp(stdin, BIO_NOCLOSE); bio_out = BIO_new_fp(stdout, BIO_NOCLOSE); - bio = BIO_push(b64, bio); - while((inlen = BIO_read(bio, inbuf, 512) > 0) - BIO_write(bio_out, inbuf, inlen); + BIO_push(b64, bio); + while((inlen = BIO_read(b64, inbuf, 512)) > 0) + BIO_write(bio_out, inbuf, inlen); - BIO_free_all(bio); + BIO_flush(bio_out); + BIO_free_all(b64); =head1 BUGS @@ -76,6 +79,13 @@ data following the base64 encoded block to be misinterpreted. There should be some way of specifying a test that the BIO can perform to reliably determine EOF (for example a MIME boundary). -=head1 SEE ALSO +=head1 COPYRIGHT + +Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved. + +Licensed under the OpenSSL license (the "License"). You may not use +this file except in compliance with the License. You can obtain a copy +in the file LICENSE in the source distribution or at +L. -TBA +=cut