From 53e652ae447fd4eafb7763ca6e1d1254609af206 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Mon, 26 Jan 2015 23:28:31 +0000 Subject: [PATCH] Provide documentation for all SSL(_CTX)?_(get|set)(_default)?_read_ahead functions. Reviewed-by: Andy Polyakov (cherry picked from commit 8507474564f3f743f5daa3468ca97a9b707b3583) --- doc/ssl/SSL_CTX_set_read_ahead.pod | 51 ++++++++++++++++++++++++++++++ doc/ssl/SSL_pending.pod | 8 +++-- doc/ssl/ssl.pod | 7 ++++ 3 files changed, 63 insertions(+), 3 deletions(-) create mode 100644 doc/ssl/SSL_CTX_set_read_ahead.pod diff --git a/doc/ssl/SSL_CTX_set_read_ahead.pod b/doc/ssl/SSL_CTX_set_read_ahead.pod new file mode 100644 index 0000000000..527164b072 --- /dev/null +++ b/doc/ssl/SSL_CTX_set_read_ahead.pod @@ -0,0 +1,51 @@ +=pod + +=head1 NAME + +SSL_CTX_set_read_ahead, SSL_CTX_set_default_read_ahead, SSL_CTX_get_read_ahead, +SSL_CTX_get_default_read_ahead, SSL_set_read_ahead, SSL_get_read_ahead +- manage whether to read as many input bytes as possible + +=head1 SYNOPSIS + + #include + + int SSL_get_read_ahead(const SSL *s); + void SSL_set_read_ahead(SSL *s, int yes); + + #define SSL_CTX_get_default_read_ahead(ctx) + #define SSL_CTX_set_default_read_ahead(ctx,m) + #define SSL_CTX_get_read_ahead(ctx) + #define SSL_CTX_set_read_ahead(ctx,m) + +=head1 DESCRIPTION + +SSL_CTX_set_read_ahead() and SSL_set_read_ahead() set whether we should read as +many input bytes as possible (for non-blocking reads) or not. For example if +B bytes are currently required by OpenSSL, but B bytes are available from +the underlying BIO (where B > B), then OpenSSL will read all B bytes +into its buffer (providing that the buffer is large enough) if reading ahead is +on, or B bytes otherwise. The parameter B or B should be 0 to ensure +reading ahead is off, or non zero otherwise. + +SSL_CTX_set_default_read_ahead is a synonym for SSL_CTX_set_read_ahead, and +SSL_CTX_get_default_read_ahead is a synonym for SSL_CTX_get_read_ahead. + +SSL_CTX_get_read_ahead() and SSL_get_read_ahead() indicate whether reading +ahead has been set or not. + +=head1 NOTES + +These functions have no impact when used with DTLS. The return values for +SSL_CTX_get_read_head() and SSL_get_read_ahead() are undefined for DTLS. + +=head1 RETURN VALUES + +SSL_get_read_ahead and SSL_CTX_get_read_ahead return 0 if reading ahead is off, +and non zero otherwise. + +=head1 SEE ALSO + +L + +=cut diff --git a/doc/ssl/SSL_pending.pod b/doc/ssl/SSL_pending.pod index 43f2874e8b..9dd071b625 100644 --- a/doc/ssl/SSL_pending.pod +++ b/doc/ssl/SSL_pending.pod @@ -29,8 +29,9 @@ The number of bytes pending is returned. SSL_pending() takes into account only bytes from the TLS/SSL record that is currently being processed (if any). If the B object's -I flag is set, additional protocol bytes may have been -read containing more TLS/SSL records; these are ignored by +I flag is set (see +L), additional protocol +bytes may have been read containing more TLS/SSL records; these are ignored by SSL_pending(). Up to OpenSSL 0.9.6, SSL_pending() does not check if the record type @@ -38,6 +39,7 @@ of pending data is application data. =head1 SEE ALSO -L, L +L, +L, L =cut diff --git a/doc/ssl/ssl.pod b/doc/ssl/ssl.pod index 6d3ee24e4e..660489a222 100644 --- a/doc/ssl/ssl.pod +++ b/doc/ssl/ssl.pod @@ -229,6 +229,8 @@ protocol context defined in the B structure. =item int (*B(SSL_CTX *ctx))(SSL *ssl, X509 **x509, EVP_PKEY **pkey); +=item void B(SSL_CTX *ctx); + =item char *B(const SSL_CTX *s, int idx); =item int B(long argl, char *argp, int (*new_func);(void), int (*dup_func)(void), void (*free_func)(void)) @@ -237,6 +239,8 @@ protocol context defined in the B structure. =item int B(const SSL_CTX *ctx); +=item void B(SSL_CTX *ctx); + =item int B(SSL_CTX *ctx); =item long B(const SSL_CTX *ctx); @@ -325,6 +329,8 @@ protocol context defined in the B structure. =item void B(SSL_CTX *ctx, int mode); +=item void B(SSL_CTX *ctx, int m); + =item void B(SSL_CTX *ctx, int mode); =item int B(SSL_CTX *ctx, const SSL_METHOD *meth); @@ -703,6 +709,7 @@ L, L, L, L, +L, L, L, L, -- 2.25.1