xref: /openbsd-src/lib/libcrypto/man/BIO_s_file.3 (revision 60e7afc9c55379d568bf7d86b70335f6c40ffee2)
1*60e7afc9Sschwarze.\" $OpenBSD: BIO_s_file.3,v 1.17 2023/11/16 20:19:23 schwarze Exp $
26a939854Sschwarze.\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
36a939854Sschwarze.\" selective merge up to: OpenSSL 1212818e Sep 11 13:22:14 2018 +0100
48974101aSjmc.\"
5e3dcf5f3Sschwarze.\" This file is a derived work.
6e3dcf5f3Sschwarze.\" The changes are covered by the following Copyright and license:
7e3dcf5f3Sschwarze.\"
8e3dcf5f3Sschwarze.\" Copyright (c) 2023 Ingo Schwarze <schwarze@openbsd.org>
9e3dcf5f3Sschwarze.\"
10e3dcf5f3Sschwarze.\" Permission to use, copy, modify, and distribute this software for any
11e3dcf5f3Sschwarze.\" purpose with or without fee is hereby granted, provided that the above
12e3dcf5f3Sschwarze.\" copyright notice and this permission notice appear in all copies.
13e3dcf5f3Sschwarze.\"
14e3dcf5f3Sschwarze.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
15e3dcf5f3Sschwarze.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
16e3dcf5f3Sschwarze.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
17e3dcf5f3Sschwarze.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
18e3dcf5f3Sschwarze.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
19e3dcf5f3Sschwarze.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
20e3dcf5f3Sschwarze.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21e3dcf5f3Sschwarze.\"
22e3dcf5f3Sschwarze.\" The original file was written by Dr. Stephen Henson <steve@openssl.org>.
239e82171dSschwarze.\" Copyright (c) 2000, 2010 The OpenSSL Project.  All rights reserved.
249e82171dSschwarze.\"
259e82171dSschwarze.\" Redistribution and use in source and binary forms, with or without
269e82171dSschwarze.\" modification, are permitted provided that the following conditions
279e82171dSschwarze.\" are met:
289e82171dSschwarze.\"
299e82171dSschwarze.\" 1. Redistributions of source code must retain the above copyright
309e82171dSschwarze.\"    notice, this list of conditions and the following disclaimer.
319e82171dSschwarze.\"
329e82171dSschwarze.\" 2. Redistributions in binary form must reproduce the above copyright
339e82171dSschwarze.\"    notice, this list of conditions and the following disclaimer in
349e82171dSschwarze.\"    the documentation and/or other materials provided with the
359e82171dSschwarze.\"    distribution.
369e82171dSschwarze.\"
379e82171dSschwarze.\" 3. All advertising materials mentioning features or use of this
389e82171dSschwarze.\"    software must display the following acknowledgment:
399e82171dSschwarze.\"    "This product includes software developed by the OpenSSL Project
409e82171dSschwarze.\"    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
419e82171dSschwarze.\"
429e82171dSschwarze.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
439e82171dSschwarze.\"    endorse or promote products derived from this software without
449e82171dSschwarze.\"    prior written permission. For written permission, please contact
459e82171dSschwarze.\"    openssl-core@openssl.org.
469e82171dSschwarze.\"
479e82171dSschwarze.\" 5. Products derived from this software may not be called "OpenSSL"
489e82171dSschwarze.\"    nor may "OpenSSL" appear in their names without prior written
499e82171dSschwarze.\"    permission of the OpenSSL Project.
509e82171dSschwarze.\"
519e82171dSschwarze.\" 6. Redistributions of any form whatsoever must retain the following
529e82171dSschwarze.\"    acknowledgment:
539e82171dSschwarze.\"    "This product includes software developed by the OpenSSL Project
549e82171dSschwarze.\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
559e82171dSschwarze.\"
569e82171dSschwarze.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
579e82171dSschwarze.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
589e82171dSschwarze.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
599e82171dSschwarze.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
609e82171dSschwarze.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
619e82171dSschwarze.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
629e82171dSschwarze.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
639e82171dSschwarze.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
649e82171dSschwarze.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
659e82171dSschwarze.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
669e82171dSschwarze.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
679e82171dSschwarze.\" OF THE POSSIBILITY OF SUCH DAMAGE.
689e82171dSschwarze.\"
69*60e7afc9Sschwarze.Dd $Mdocdate: November 16 2023 $
709a4ad174Sschwarze.Dt BIO_S_FILE 3
719a4ad174Sschwarze.Os
729a4ad174Sschwarze.Sh NAME
739a4ad174Sschwarze.Nm BIO_s_file ,
749a4ad174Sschwarze.Nm BIO_new_file ,
759a4ad174Sschwarze.Nm BIO_new_fp ,
769a4ad174Sschwarze.Nm BIO_set_fp ,
779a4ad174Sschwarze.Nm BIO_get_fp ,
789a4ad174Sschwarze.Nm BIO_read_filename ,
799a4ad174Sschwarze.Nm BIO_write_filename ,
809a4ad174Sschwarze.Nm BIO_append_filename ,
819a4ad174Sschwarze.Nm BIO_rw_filename
827267dfddSjsg.\" Nm BIO_CTRL_SET_FILENAME is unused and intentionally undocumented.
83b34045edSjmc.Nd FILE BIO
849a4ad174Sschwarze.Sh SYNOPSIS
859a4ad174Sschwarze.In openssl/bio.h
86d1459b61Stb.Ft const BIO_METHOD *
879a4ad174Sschwarze.Fo BIO_s_file
889a4ad174Sschwarze.Fa void
899a4ad174Sschwarze.Fc
909a4ad174Sschwarze.Ft BIO *
919a4ad174Sschwarze.Fo BIO_new_file
929a4ad174Sschwarze.Fa "const char *filename"
939a4ad174Sschwarze.Fa "const char *mode"
949a4ad174Sschwarze.Fc
959a4ad174Sschwarze.Ft BIO *
969a4ad174Sschwarze.Fo BIO_new_fp
979a4ad174Sschwarze.Fa "FILE *stream"
989a4ad174Sschwarze.Fa "int flags"
999a4ad174Sschwarze.Fc
1009a4ad174Sschwarze.Ft long
1019a4ad174Sschwarze.Fo BIO_set_fp
1029a4ad174Sschwarze.Fa "BIO *b"
1039a4ad174Sschwarze.Fa "FILE *fp"
1049a4ad174Sschwarze.Fa "int flags"
1059a4ad174Sschwarze.Fc
1069a4ad174Sschwarze.Ft long
1079a4ad174Sschwarze.Fo BIO_get_fp
1089a4ad174Sschwarze.Fa "BIO *b"
1099a4ad174Sschwarze.Fa "FILE **fpp"
1109a4ad174Sschwarze.Fc
1113f6ddbdbSschwarze.Ft long
1129a4ad174Sschwarze.Fo BIO_read_filename
1139a4ad174Sschwarze.Fa "BIO *b"
1149a4ad174Sschwarze.Fa "char *name"
1159a4ad174Sschwarze.Fc
1163f6ddbdbSschwarze.Ft long
1179a4ad174Sschwarze.Fo BIO_write_filename
1189a4ad174Sschwarze.Fa "BIO *b"
1199a4ad174Sschwarze.Fa "char *name"
1209a4ad174Sschwarze.Fc
1213f6ddbdbSschwarze.Ft long
1229a4ad174Sschwarze.Fo BIO_append_filename
1239a4ad174Sschwarze.Fa "BIO *b"
1249a4ad174Sschwarze.Fa "char *name"
1259a4ad174Sschwarze.Fc
1263f6ddbdbSschwarze.Ft long
1279a4ad174Sschwarze.Fo BIO_rw_filename
1289a4ad174Sschwarze.Fa "BIO *b"
1299a4ad174Sschwarze.Fa "char *name"
1309a4ad174Sschwarze.Fc
1319a4ad174Sschwarze.Sh DESCRIPTION
1329a4ad174Sschwarze.Fn BIO_s_file
1339a4ad174Sschwarzereturns the BIO file method.
1349a4ad174SschwarzeAs its name implies, it is a wrapper around the stdio
1359a4ad174Sschwarze.Vt FILE
1369a4ad174Sschwarzestructure and it is a source/sink BIO.
1379a4ad174Sschwarze.Pp
1389a4ad174SschwarzeCalls to
1399a4ad174Sschwarze.Xr BIO_read 3
1409a4ad174Sschwarzeand
1419a4ad174Sschwarze.Xr BIO_write 3
1429a4ad174Sschwarzeread and write data to the underlying stream.
1439a4ad174Sschwarze.Xr BIO_gets 3
1449a4ad174Sschwarzeand
1459a4ad174Sschwarze.Xr BIO_puts 3
1469a4ad174Sschwarzeare supported on file BIOs.
1479a4ad174Sschwarze.Pp
1489a4ad174Sschwarze.Xr BIO_flush 3
1499a4ad174Sschwarzeon a file BIO calls the
1509a4ad174Sschwarze.Xr fflush 3
1519a4ad174Sschwarzefunction on the wrapped stream.
1529a4ad174Sschwarze.Pp
1539a4ad174Sschwarze.Xr BIO_reset 3
1549a4ad174Sschwarzeattempts to change the file pointer to the start of file using
1559a4ad174Sschwarze.Fn fseek stream 0 0 .
1569a4ad174Sschwarze.Pp
1579a4ad174Sschwarze.Xr BIO_seek 3
1589a4ad174Sschwarzesets the file pointer to position
1599a4ad174Sschwarze.Fa ofs
1609a4ad174Sschwarzefrom the start of the file using
1619a4ad174Sschwarze.Fn fseek stream ofs 0 .
1629a4ad174Sschwarze.Pp
1639a4ad174Sschwarze.Xr BIO_eof 3
1649a4ad174Sschwarzecalls
1659a4ad174Sschwarze.Xr feof 3 .
1669a4ad174Sschwarze.Pp
1679a4ad174SschwarzeSetting the
1689a4ad174Sschwarze.Dv BIO_CLOSE
1699a4ad174Sschwarzeflag calls
1709a4ad174Sschwarze.Xr fclose 3
1719a4ad174Sschwarzeon the stream when the BIO is freed.
1729a4ad174Sschwarze.Pp
1739a4ad174Sschwarze.Fn BIO_new_file
1749a4ad174Sschwarzecreates a new file BIO with mode
1759a4ad174Sschwarze.Fa mode .
1769a4ad174SschwarzeThe meaning of
1779a4ad174Sschwarze.Fa mode
1789a4ad174Sschwarzeis the same as for the stdio function
1799a4ad174Sschwarze.Xr fopen 3 .
1809a4ad174SschwarzeThe
1819a4ad174Sschwarze.Dv BIO_CLOSE
1829a4ad174Sschwarzeflag is set on the returned BIO.
1839a4ad174Sschwarze.Pp
1849a4ad174Sschwarze.Fn BIO_new_fp
1859a4ad174Sschwarzecreates a file BIO wrapping
1869a4ad174Sschwarze.Fa stream .
1879a4ad174SschwarzeFlags can be:
1889a4ad174Sschwarze.Dv BIO_CLOSE , BIO_NOCLOSE Pq the close flag ,
1899a4ad174Sschwarze.Dv BIO_FP_TEXT
1909a4ad174Sschwarze(sets the underlying stream to text mode, default is binary:
1919a4ad174Sschwarzethis only has any effect under Win32).
1929a4ad174Sschwarze.Pp
1939a4ad174Sschwarze.Fn BIO_set_fp
1946a939854Sschwarzesets the file pointer of a file BIO to
1959a4ad174Sschwarze.Fa fp .
1969a4ad174Sschwarze.Fa flags
1979a4ad174Sschwarzehas the same meaning as in
1989a4ad174Sschwarze.Fn BIO_new_fp .
1999a4ad174Sschwarze.Pp
2009a4ad174Sschwarze.Fn BIO_get_fp
201*60e7afc9Sschwarzeretrieves the file pointer of a file BIO.
2029a4ad174Sschwarze.Pp
2039a4ad174Sschwarze.Xr BIO_seek 3
204*60e7afc9Sschwarzesets the position pointer to
2059a4ad174Sschwarze.Fa offset
2069a4ad174Sschwarzebytes from the start of file.
2079a4ad174Sschwarze.Pp
2089a4ad174Sschwarze.Xr BIO_tell 3
2099a4ad174Sschwarzereturns the value of the position pointer.
2109a4ad174Sschwarze.Pp
2119a4ad174Sschwarze.Fn BIO_read_filename ,
2129a4ad174Sschwarze.Fn BIO_write_filename ,
2139a4ad174Sschwarze.Fn BIO_append_filename ,
2149a4ad174Sschwarzeand
2159a4ad174Sschwarze.Fn BIO_rw_filename
2169a4ad174Sschwarzeset the file BIO
2179a4ad174Sschwarze.Fa b
2189a4ad174Sschwarzeto use file
2199a4ad174Sschwarze.Fa name
2209a4ad174Sschwarzefor reading, writing, append or read write respectively.
221b34045edSjmc.Pp
2229a4ad174SschwarzeWhen wrapping stdout, stdin, or stderr, the underlying stream
2239a4ad174Sschwarzeshould not normally be closed, so the
2249a4ad174Sschwarze.Dv BIO_NOCLOSE
2259a4ad174Sschwarzeflag should be set.
2269a4ad174Sschwarze.Pp
2279a4ad174SschwarzeBecause the file BIO calls the underlying stdio functions, any quirks
2289a4ad174Sschwarzein stdio behaviour will be mirrored by the corresponding BIO.
2299a4ad174Sschwarze.Pp
2309a4ad174SschwarzeOn Windows,
2319a4ad174Sschwarze.Fn BIO_new_files
2329a4ad174Sschwarzereserves for the filename argument to be UTF-8 encoded.
2339a4ad174SschwarzeIn other words, if you have to make it work in a multi-lingual
2349a4ad174Sschwarzeenvironment, encode file names in UTF-8.
235e3dcf5f3Sschwarze.Pp
236e3dcf5f3SschwarzeThe following
237e3dcf5f3Sschwarze.Xr BIO_ctrl 3
238e3dcf5f3Sschwarze.Fa cmd
239e3dcf5f3Sschwarzeconstants correspond to macros:
240e3dcf5f3Sschwarze.Bl -column BIO_C_GET_FILE_PTR "corresponding macro" -offset 3n
241e3dcf5f3Sschwarze.It Fa cmd No constant    Ta corresponding macro
2423f6ddbdbSschwarze.It Dv BIO_C_FILE_SEEK    Ta Xr BIO_seek 3
2433f6ddbdbSschwarze.It Dv BIO_C_FILE_TELL    Ta Xr BIO_tell 3
244e3dcf5f3Sschwarze.It Dv BIO_C_GET_FILE_PTR Ta Fn BIO_get_fp
245e3dcf5f3Sschwarze.It Dv BIO_C_SET_FILE_PTR Ta Fn BIO_set_fp
246e3dcf5f3Sschwarze.It Dv BIO_C_SET_FILENAME Ta various, see below
2473f6ddbdbSschwarze.It Dv BIO_CTRL_EOF       Ta Xr BIO_eof 3
2483f6ddbdbSschwarze.It Dv BIO_CTRL_FLUSH     Ta Xr BIO_flush 3
2493f6ddbdbSschwarze.It Dv BIO_CTRL_GET_CLOSE Ta Xr BIO_get_close 3
2503f6ddbdbSschwarze.It Dv BIO_CTRL_RESET     Ta Xr BIO_reset 3
2513f6ddbdbSschwarze.It Dv BIO_CTRL_SET_CLOSE Ta Xr BIO_set_close 3
252e3dcf5f3Sschwarze.El
253e3dcf5f3Sschwarze.Pp
254e3dcf5f3SschwarzeThe meaning of
255e3dcf5f3Sschwarze.Dv BIO_C_SET_FILENAME
256e3dcf5f3Sschwarzedepends on the flags passed in the
257e3dcf5f3Sschwarze.Xr BIO_ctrl 3
258e3dcf5f3Sschwarze.Fa larg
259e3dcf5f3Sschwarzeargument:
260e3dcf5f3Sschwarze.Bl -column "BIO_CLOSE | BIO_FP_READ | BIO_FP_WRITE" "BIO_append_filename()"\
261e3dcf5f3Sschwarze -offset 3n
262e3dcf5f3Sschwarze.It Fa larg No argument                        Ta corresponding macro
263e3dcf5f3Sschwarze.It Dv BIO_CLOSE | BIO_FP_READ                 Ta Fn BIO_read_filename
264e3dcf5f3Sschwarze.It Dv BIO_CLOSE | BIO_FP_WRITE                Ta Fn BIO_write_filename
265e3dcf5f3Sschwarze.It Dv BIO_CLOSE | BIO_FP_APPEND               Ta Fn BIO_append_filename
266e3dcf5f3Sschwarze.It Dv BIO_CLOSE | BIO_FP_READ  | BIO_FP_WRITE Ta Fn BIO_rw_filename
267e3dcf5f3Sschwarze.El
2689a4ad174Sschwarze.Sh RETURN VALUES
2699a4ad174Sschwarze.Fn BIO_s_file
2709a4ad174Sschwarzereturns the file BIO method.
2719a4ad174Sschwarze.Pp
2729a4ad174Sschwarze.Fn BIO_new_file
2739a4ad174Sschwarzeand
2749a4ad174Sschwarze.Fn BIO_new_fp
2759a4ad174Sschwarzereturn a file BIO or
2769a4ad174Sschwarze.Dv NULL
2779a4ad174Sschwarzeif an error occurred.
2789a4ad174Sschwarze.Pp
279eae3c81dSschwarzeWhen called on a file BIO object,
280eae3c81dSschwarze.Xr BIO_method_type 3
281eae3c81dSschwarzereturns the constant
282eae3c81dSschwarze.Dv BIO_TYPE_FILE
283eae3c81dSschwarzeand
284eae3c81dSschwarze.Xr BIO_method_name 3
285eae3c81dSschwarzereturns a pointer to the static string
286eae3c81dSschwarze.Qq FILE pointer .
287eae3c81dSschwarze.Pp
2889a4ad174Sschwarze.Fn BIO_set_fp
2899a4ad174Sschwarzeand
2909a4ad174Sschwarze.Fn BIO_get_fp
2919a4ad174Sschwarzereturn 1 for success or 0 for failure (although the current
2929a4ad174Sschwarzeimplementation never returns 0).
2939a4ad174Sschwarze.Pp
2949a4ad174Sschwarze.Xr BIO_seek 3
2959a4ad174Sschwarzereturns the same value as the underlying
2969a4ad174Sschwarze.Xr fseek 3
2979a4ad174Sschwarzefunction: 0 for success or -1 for failure.
2989a4ad174Sschwarze.Pp
2999a4ad174Sschwarze.Xr BIO_tell 3
3009a4ad174Sschwarzereturns the current file position.
3019a4ad174Sschwarze.Pp
3029a4ad174Sschwarze.Fn BIO_read_filename ,
3039a4ad174Sschwarze.Fn BIO_write_filename ,
3049a4ad174Sschwarze.Fn BIO_append_filename ,
3059a4ad174Sschwarzeand
3069a4ad174Sschwarze.Fn BIO_rw_filename
3079a4ad174Sschwarzereturn 1 for success or 0 for failure.
3089a4ad174Sschwarze.Sh EXAMPLES
3099a4ad174SschwarzeFile BIO "hello world":
3109a4ad174Sschwarze.Bd -literal -offset indent
3119a4ad174SschwarzeBIO *bio_out;
3129a4ad174Sschwarzebio_out = BIO_new_fp(stdout, BIO_NOCLOSE);
3139a4ad174SschwarzeBIO_printf(bio_out, "Hello World\en");
3149a4ad174Sschwarze.Ed
3159a4ad174Sschwarze.Pp
3169a4ad174SschwarzeAlternative technique:
3179a4ad174Sschwarze.Bd -literal -offset indent
3189a4ad174SschwarzeBIO *bio_out;
3199a4ad174Sschwarzebio_out = BIO_new(BIO_s_file());
3209a4ad174Sschwarzeif(bio_out == NULL) /* Error ... */
3219a4ad174Sschwarzeif(!BIO_set_fp(bio_out, stdout, BIO_NOCLOSE)) /* Error ... */
3229a4ad174SschwarzeBIO_printf(bio_out, "Hello World\en");
3239a4ad174Sschwarze.Ed
3249a4ad174Sschwarze.Pp
3259a4ad174SschwarzeWrite to a file:
3269a4ad174Sschwarze.Bd -literal -offset indent
3279a4ad174SschwarzeBIO *out;
3289a4ad174Sschwarzeout = BIO_new_file("filename.txt", "w");
3299a4ad174Sschwarzeif(!out) /* Error occurred */
3309a4ad174SschwarzeBIO_printf(out, "Hello World\en");
3319a4ad174SschwarzeBIO_free(out);
3329a4ad174Sschwarze.Ed
3339a4ad174Sschwarze.Pp
3349a4ad174SschwarzeAlternative technique:
3359a4ad174Sschwarze.Bd -literal -offset indent
3369a4ad174SschwarzeBIO *out;
3379a4ad174Sschwarzeout = BIO_new(BIO_s_file());
3389a4ad174Sschwarzeif(out == NULL) /* Error ... */
3399a4ad174Sschwarzeif(!BIO_write_filename(out, "filename.txt")) /* Error ... */
3409a4ad174SschwarzeBIO_printf(out, "Hello World\en");
3419a4ad174SschwarzeBIO_free(out);
3429a4ad174Sschwarze.Ed
3439a4ad174Sschwarze.Sh SEE ALSO
34483df270eSschwarze.Xr BIO_new 3 ,
3459a4ad174Sschwarze.Xr BIO_read 3 ,
3469a4ad174Sschwarze.Xr BIO_seek 3
34787294479Sschwarze.Sh HISTORY
34810e00d17Sschwarze.Fn BIO_s_file ,
34910e00d17Sschwarze.Fn BIO_set_fp ,
35094cd7e1eSschwarze.Fn BIO_get_fp ,
35194cd7e1eSschwarze.Fn BIO_read_filename ,
35294cd7e1eSschwarze.Fn BIO_write_filename ,
35394cd7e1eSschwarzeand
35494cd7e1eSschwarze.Fn BIO_append_filename
35510e00d17Sschwarzefirst appeared in SSLeay 0.6.0.
35610e00d17Sschwarze.Fn BIO_new_file
35710e00d17Sschwarzeand
35810e00d17Sschwarze.Fn BIO_new_fp
35910e00d17Sschwarzefirst appeared in SSLeay 0.8.0.
36094cd7e1eSschwarzeAll these functions have been available since
36187294479Sschwarze.Ox 2.4 .
362b455b8f6Sschwarze.Pp
363b455b8f6Sschwarze.Fn BIO_rw_filename
364b455b8f6Sschwarzefirst appeared in SSLeay 0.9.1 and has been available since
365b455b8f6Sschwarze.Ox 2.6 .
3669a4ad174Sschwarze.Sh BUGS
3679a4ad174Sschwarze.Xr BIO_reset 3
3689a4ad174Sschwarzeand
3699a4ad174Sschwarze.Xr BIO_seek 3
3709a4ad174Sschwarzeare implemented using
3719a4ad174Sschwarze.Xr fseek 3
3729a4ad174Sschwarzeon the underlying stream.
3739a4ad174SschwarzeThe return value for
3749a4ad174Sschwarze.Xr fseek 3
3759a4ad174Sschwarzeis 0 for success or -1 if an error occurred.
3769a4ad174SschwarzeThis differs from other types of BIO which will typically return
377b34045edSjmc1 for success and a non-positive value if an error occurred.
378