Commit 8de7587e authored by Richard Levitte's avatar Richard Levitte
Browse files

Merge from main trunk.

parent 90ac5863
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -474,6 +474,7 @@ size_t BIO_ctrl_wpending(BIO *b);
#define BIO_get_write_buf_size(b,size) (size_t)BIO_ctrl(b,BIO_C_GET_WRITE_BUF_SIZE,size,NULL)
#define BIO_make_bio_pair(b1,b2)   (int)BIO_ctrl(b1,BIO_C_MAKE_BIO_PAIR,0,b2)
#define BIO_destroy_bio_pair(b)    (int)BIO_ctrl(b,BIO_C_DESTROY_BIO_PAIR,0,NULL)
#define BIO_set_shutdown_wr(b) (int)BIO_ctrl(b, BIO_C_SHUTDOWN_WR, 0, NULL)
/* macros with inappropriate type -- but ...pending macros use int too: */
#define BIO_get_write_guarantee(b) (int)BIO_ctrl(b,BIO_C_GET_WRITE_GUARANTEE,0,NULL)
#define BIO_get_read_request(b)    (int)BIO_ctrl(b,BIO_C_GET_READ_REQUEST,0,NULL)
+1 −1
Original line number Diff line number Diff line
@@ -694,7 +694,7 @@ There should be options to explicitly set such things as start and end
dates rather than an offset from the current time.

The code to implement the verify behaviour described in the B<TRUST SETTINGS>
is currently being developed. It thus describes the intended behavior rather
is currently being developed. It thus describes the intended behaviour rather
than the current behaviour. It is hoped that it will represent reality in
OpenSSL 0.9.5 and later.

+27 −7
Original line number Diff line number Diff line
@@ -3,9 +3,9 @@
=head1 NAME

BIO_ctrl, BIO_callback_ctrl, BIO_ptr_ctrl, BIO_int_ctrl, BIO_reset,
BIO_flush, BIO_eof, BIO_set_close, BIO_get_close, BIO_pending,
BIO_wpending, BIO_ctrl_pending, BIO_ctrl_wpending, BIO_get_info_callback,
BIO_set_info_callback - BIO control operations
BIO_seek, BIO_tell, BIO_flush, BIO_eof, BIO_set_close, BIO_get_close,
BIO_pending, BIO_wpending, BIO_ctrl_pending, BIO_ctrl_wpending,
BIO_get_info_callback, BIO_set_info_callback - BIO control operations

=head1 SYNOPSIS

@@ -17,6 +17,8 @@ BIO_set_info_callback - BIO control operations
 long BIO_int_ctrl(BIO *bp,int cmd,long larg,int iarg);

 int BIO_reset(BIO *b);
 int BIO_seek(BIO *b, int ofs);
 int BIO_tell(BIO *b);
 int BIO_flush(BIO *b);
 int BIO_eof(BIO *b);
 int BIO_set_close(BIO *b,long flag);
@@ -41,8 +43,14 @@ specific to a particular type of BIO are described in the specific
BIOs manual page as well as any special features of the standard
calls.

BIO_reset() typically reset a BIO to some initial state, in the case
of file related BIOs for example it rewinds the file pointer.
BIO_reset() typically resets a BIO to some initial state, in the case
of file related BIOs for example it rewinds the file pointer to the
start of the file.

BIO_seek() resets a file related BIO's file position pointer to B<ofs>
bytes from start of file.

BIO_tell() returns the current file position of a file related BIO.

BIO_flush() normally writes out any internally buffered data, in some
cases it is used to signal EOF and that no more data will be written.
@@ -58,14 +66,17 @@ be closed when the BIO is freed.
BIO_get_close() returns the BIOs close flag.

BIO_pending(), BIO_ctrl_pending(), BIO_wpending() and BIO_ctrl_wpending()
return the number of pending characterers in the BIOs read and write buffers.
return the number of pending characters in the BIOs read and write buffers.
Not all BIOs support these calls. BIO_ctrl_pending() and BIO_ctrl_wpending()
return a size_t type and are functions, BIO_pending() and BIO_wpending() are
macros which call BIO_ctrl().

=head1 RETURN VALUES

BIO_reset() returns 1 fo success and 0 for failure.
BIO_reset() returns 1 for success and 0 for failure.

BIO_seek() and BIO_tell() both return the current file position on success
and -1 for failure.

BIO_flush() returns 1 for success and 0 or -1 for failure.

@@ -91,6 +102,15 @@ case of a file BIO some data may be available in the FILE structures
internal buffers but it is not possible to determine this in a
portably way. For other types of BIO they may not be supported.

Filter BIOs if the do not internally handle a particular BIO_ctrl()
operation usually pass the operation to the next BIO in the chain.
This often means there is no need to locate the required BIO for
a particular operation, it can be called on a chain and it will
be automatically passed to the relevant BIO.

Source/sink BIOs will return an error if the do not recognize the
BIO_ctrl() operation.

=head1 SEE ALSO

TBA
+0 −38
Original line number Diff line number Diff line
=pod

=head1 NAME

 BIO_ctrl_get_read_request - Find out how much bytes are were requested from the BIO

=head1 SYNOPSIS

 #include <openssl/bio.h>

 size_t BIO_ctrl_get_read_request(BIO *bio);

=head1 DESCRIPTION

BIO_ctrl_get_read_request() returns the number of bytes that were last
requested from B<bio> by a BIO_read() operation. This is useful e.g. for
BIO pairs, so that the application knows how much bytes to supply to B<bio>.

=head1 BUGS

When B<bio> is NULL, the OpenSSL library calls assert().

=head1 RETURN VALUES

The following return values can occur:

=over 4

=item E<gt>=0

The number of bytes requested.

=back

=head1 SEE ALSO

L<bio(3)|bio(3)>, L<BIO_s_mem(3)|BIO_s_mem(3)>,
L<BIO_new_bio_pair(3)|BIO_new_bio_pair(3)>

doc/crypto/BIO_ctrl_pending.pod

deleted100644 → 0
+0 −36
Original line number Diff line number Diff line
=pod

=head1 NAME

BIO_ctrl_pending - Find out how much bytes are buffered in a BIO

=head1 SYNOPSIS

 #include <openssl/bio.h>

 size_t BIO_ctrl_pending(BIO *bio);

=head1 DESCRIPTION

BIO_ctrl_pending() returns the number of bytes buffered in a BIO.

=head1 BUGS

When B<bio> is NULL, the OpenSSL library calls assert().

=head1 RETURN VALUES

The following return values can occur:

=over 4

=item E<gt>=0

The number of bytes pending the BIO.

=back

=head1 SEE ALSO

L<bio(3)|bio(3)>, L<BIO_s_mem(3)|BIO_s_mem(3)>,
L<BIO_new_bio_pair(3)|BIO_new_bio_pair(3)>
Loading