You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-05 15:55:58 +03:00
Workaround for CONC-417, MDEV-13492
At irregular intervals older windows versions (prior Windows 10) fail to establish a secure (TLS) connection and return errors SEC_E_INVALID_TOKEN, SEC_E_BUFFER_TOO_SMALL or SEC_E_MESSAGE_ALTERED. This is a bug in windows schannel library and was only fixed in recent versions, also OpenSSL provided a workaround (see https://github.com/openssl/openssl/pull/1350). Since we are unable to fix this, we introduced a workaround for this problem. In case of an error during TLS handshake we check the errorcode and try to reconnect up to three times if the error code was SEC_E_INVALID_TOKEN, SEC_E_BUFFER_TOO_SMALL or SEC_E_MESSAGE_ALTERED.
This commit is contained in:
@@ -140,6 +140,7 @@ extern const char *SQLSTATE_UNKNOWN;
|
||||
(a)->net.last_errno= 0;\
|
||||
strcpy((a)->net.sqlstate, "00000");\
|
||||
(a)->net.last_error[0]= '\0';\
|
||||
(a)->net.extension->extended_errno= 0;\
|
||||
}
|
||||
|
||||
#define MYSQL_COUNT_ERROR (~(unsigned long long) 0)
|
||||
|
Reference in New Issue
Block a user