|
static void | report_errors (SSL *ssl) |
|
static void | ssl_set_sys_error (int ssl_error) |
| Obtain the equivalent system error status for the last SSL I/O operation. More...
|
|
static bool | ssl_should_retry (Vio *vio, int ret, enum enum_vio_io_event *event, unsigned long *ssl_errno_holder) |
| Check if an operation should be retried and handle errors. More...
|
|
size_t | vio_ssl_read (Vio *vio, uchar *buf, size_t size) |
|
size_t | vio_ssl_write (Vio *vio, const uchar *buf, size_t size) |
|
int | vio_ssl_shutdown (Vio *vio) |
|
void | vio_ssl_delete (Vio *vio) |
|
static size_t | ssl_handshake_loop (Vio *vio, SSL *ssl, ssl_handshake_func_t func, unsigned long *ssl_errno_holder) |
| Loop and wait until a SSL handshake is completed. More...
|
|
long | pfs_ssl_bio_callback_ex (BIO *b, int oper, const char *, size_t len, int, long, int ret, size_t *processed) |
|
long | pfs_ssl_bio_callback (BIO *b, int oper, const char *argp, int argi, long argl, long ret) |
| Forward openSSL old style callback to openSSL 1.1.1 style callback. More...
|
|
static void | pfs_ssl_setup_instrumentation (Vio *vio, const SSL *ssl) |
|
static void | print_ssl_session_id (SSL_SESSION *sess, const char *action) |
|
static int | ssl_do (struct st_VioSSLFd *ptr, Vio *vio, long timeout, SSL_SESSION *ssl_session, ssl_handshake_func_t func, unsigned long *ssl_errno_holder, SSL **sslptr, const char *sni_servername) |
|
int | sslaccept (struct st_VioSSLFd *ptr, Vio *vio, long timeout, unsigned long *ssl_errno_holder) |
|
int | sslconnect (struct st_VioSSLFd *ptr, Vio *vio, long timeout, SSL_SESSION *session, unsigned long *ssl_errno_holder, SSL **ssl, const char *sni_servername) |
|
bool | vio_ssl_has_data (Vio *vio) |
|
static bool ssl_should_retry |
( |
Vio * |
vio, |
|
|
int |
ret, |
|
|
enum enum_vio_io_event * |
event, |
|
|
unsigned long * |
ssl_errno_holder |
|
) |
| |
|
static |
Check if an operation should be retried and handle errors.
This function does the following:
- it indicates whether a SSL I/O operation must be retried later;
- if DBUG is enabled it prints all the errors in the thread's queue to DBUG
- it clears the OpenSSL error queue, thus the next OpenSSL-operation can be performed even after failed OpenSSL-call.
Note that this is not done for SSL_ERROR_WANT_READ/SSL_ERROR_WANT_WRITE since these are not treated as errors and a call to the function is retried.
When SSL_ERROR_SSL is returned the ERR code of the top error in the queue is peeked and returned to the caller so they can call ERR_error_string_n() and retrieve the right error message.
- Parameters
-
| vio | VIO object representing a SSL connection. |
| ret | Value returned by a SSL I/O function. |
[out] | event | The type of I/O event to wait/retry. |
[out] | ssl_errno_holder | The SSL error code. |
- Returns
- Whether a SSL I/O operation should be deferred.
- Return values
-
true | Temporary failure, retry operation. |
false | Indeterminate failure. |