Update pre9
This commit is contained in:
@@ -2,14 +2,16 @@
|
||||
|
||||
=head1 NAME
|
||||
|
||||
SSL_CTX_set_mode, SSL_set_mode, SSL_CTX_get_mode, SSL_get_mode - manipulate SSL engine mode
|
||||
SSL_CTX_set_mode, SSL_CTX_clear_mode, SSL_set_mode, SSL_clear_mode, SSL_CTX_get_mode, SSL_get_mode - manipulate SSL engine mode
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
long SSL_CTX_set_mode(SSL_CTX *ctx, long mode);
|
||||
long SSL_CTX_clear_mode(SSL_CTX *ctx, long mode);
|
||||
long SSL_set_mode(SSL *ssl, long mode);
|
||||
long SSL_clear_mode(SSL *ssl, long mode);
|
||||
|
||||
long SSL_CTX_get_mode(SSL_CTX *ctx);
|
||||
long SSL_get_mode(SSL *ssl);
|
||||
@@ -18,9 +20,11 @@ SSL_CTX_set_mode, SSL_set_mode, SSL_CTX_get_mode, SSL_get_mode - manipulate SSL
|
||||
|
||||
SSL_CTX_set_mode() adds the mode set via bitmask in B<mode> to B<ctx>.
|
||||
Options already set before are not cleared.
|
||||
SSL_CTX_clear_mode() removes the mode set via bitmask in B<mode> from B<ctx>.
|
||||
|
||||
SSL_set_mode() adds the mode set via bitmask in B<mode> to B<ssl>.
|
||||
Options already set before are not cleared.
|
||||
SSL_clear_mode() removes the mode set via bitmask in B<mode> from B<ssl>.
|
||||
|
||||
SSL_CTX_get_mode() returns the mode set for B<ctx>.
|
||||
|
||||
@@ -51,16 +55,31 @@ non-blocking write().
|
||||
|
||||
=item SSL_MODE_AUTO_RETRY
|
||||
|
||||
Never bother the application with retries if the transport is blocking.
|
||||
If a renegotiation take place during normal operation, a
|
||||
L<SSL_read_ex(3)>, L<SSL_read(3)>, L<SSL_write_ex(3)> or L<SSL_write(3)> would
|
||||
return with a failure and indicate the need to retry with SSL_ERROR_WANT_READ.
|
||||
During normal operations, non-application data records might need to be sent or
|
||||
received that the application is not aware of.
|
||||
If a non-application data record was processed,
|
||||
L<SSL_read_ex(3)> and L<SSL_read(3)> can return with a failure and indicate the
|
||||
need to retry with B<SSL_ERROR_WANT_READ>.
|
||||
If such a non-application data record was processed, the flag
|
||||
B<SSL_MODE_AUTO_RETRY> causes it to try to process the next record instead of
|
||||
returning.
|
||||
|
||||
In a non-blocking environment applications must be prepared to handle
|
||||
incomplete read/write operations.
|
||||
Setting B<SSL_MODE_AUTO_RETRY> for a non-blocking B<BIO> will process
|
||||
non-application data records until either no more data is available or
|
||||
an application data record has been processed.
|
||||
|
||||
In a blocking environment, applications are not always prepared to
|
||||
deal with read/write operations returning without success report. The
|
||||
flag SSL_MODE_AUTO_RETRY will cause read/write operations to only
|
||||
return after the handshake and successful completion.
|
||||
deal with the functions returning intermediate reports such as retry
|
||||
requests, and setting the B<SSL_MODE_AUTO_RETRY> flag will cause the functions
|
||||
to only return after successfully processing an application data record or a
|
||||
failure.
|
||||
|
||||
Turning off B<SSL_MODE_AUTO_RETRY> can be useful with blocking B<BIO>s in case
|
||||
they are used in combination with something like select() or poll().
|
||||
Otherwise the call to SSL_read() or SSL_read_ex() might hang when a
|
||||
non-application record was sent and no application data was sent.
|
||||
|
||||
=item SSL_MODE_RELEASE_BUFFERS
|
||||
|
||||
@@ -88,6 +107,9 @@ used to perform cryptographic operations. See L<SSL_get_error(3)>.
|
||||
|
||||
=back
|
||||
|
||||
All modes are off by default except for SSL_MODE_AUTO_RETRY which is on by
|
||||
default since 1.1.1.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
SSL_CTX_set_mode() and SSL_set_mode() return the new mode bitmask
|
||||
|
||||
Reference in New Issue
Block a user