summaryrefslogtreecommitdiff
path: root/vio
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.2 into 10.3Marko Mäkelä2021-03-271-24/+35
|\
| * Cleanup - reduce duplicate code, in SSL IO error handling.bb-10.2-sysprgVladislav Vaintroub2021-03-251-23/+29
| |
| * MDEV-23740 postfix - potentially uninitialized variable passed to ↵Vladislav Vaintroub2021-03-241-10/+15
| | | | | | | | | | | | vio_socket_io_wait. Thanks to Daniel Black for reporting.
* | Merge 10.2 into 10.3Marko Mäkelä2021-03-181-0/+15
|\ \ | |/
| * MDEV-23740 - X509_R_CERT_ALREADY_IN_HASH_TABLE when establishing SSL ↵Vladislav Vaintroub2021-03-151-0/+15
| | | | | | | | | | | | | | | | | | connection connection. Ignore harmless X509_R_CERT_ALREADY_IN_HASH_TABLE, similar to how Curl or other projects treat it.
* | MDEV-23348 vio_shutdown does not prevent later ReadFile on named pipeVladislav Vaintroub2020-08-032-4/+14
| | | | | | | | | | Introduce st_vio::shutdown_flag to be checked prior to Read/WriteFile and during wait for async.io to finish.
* | MDEV-21101 unexpected wait_timeout with pool-of-threadsVladislav Vaintroub2020-07-303-9/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to restricted size of the threadpool, execution of client queries can be delayed (queued) for a while. This delay was interpreted as client inactivity, and connection is closed, if client idle time + queue time exceeds wait_timeout. But users did not expect queue time to be included into wait_timeout. This patch changes the behavior. We don't close connection anymore, if there is some unread data present on connection, even if wait_timeout is exceeded. Unread data means that client was not idle, it sent a query, which we did not have time to process yet.
* | Merge branch '10.2' into 10.3Oleksandr Byelkin2020-05-041-1/+1
|\ \ | |/
| * Merge branch '10.1' into 10.2Oleksandr Byelkin2020-05-021-1/+1
| |\
| | * vio: typo on sock{et}_errno in commentDaniel Black2020-04-291-1/+1
| | |
| * | Fix warning when compiling with OpenSSL.Vladislav Vaintroub2019-09-091-1/+1
| | |
* | | Merge 10.2 into 10.3Marko Mäkelä2019-05-1414-14/+14
|\ \ \ | |/ /
| * | Merge 10.1 into 10.2Marko Mäkelä2019-05-1314-14/+14
| |\ \ | | |/
| | * Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-1114-14/+14
| | |\
| | | * Update FSF AddressVicențiu Ciorbaru2019-05-1112-12/+12
| | | | | | | | | | | | | | | | * Update wrong zip-code
* | | | Merge 10.2 into 10.3Marko Mäkelä2018-11-071-7/+3
|\ \ \ \ | |/ / /
| * | | MDEV-14781 - threadpool slowdown with slow ssl handshake.Vladislav Vaintroub2018-11-071-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix is not to use blocking socket IO during SSL handshake. With non-blocking socket IO, threadpool is able to utilize the wait notification callbacks, that vio_io_wait() is calling whenever socket would block.
* | | | Windows : fix broken build with OpenSSLVladislav Vaintroub2018-09-081-1/+1
| | | |
* | | | Merge branch '10.2' into 10.3Sergei Golubchik2018-06-301-0/+1
|\ \ \ \ | |/ / /
| * | | MDEV-15596 10.2 doesn't work with openssl 1.1.1Georg Richter2018-06-211-0/+1
| | | |
* | | | Make possible to use clang on Windows (clang-cl)Vladislav Vaintroub2018-02-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | -DWITH_ASAN can be used as well now, on x64 Fix many clang-cl warnings.
* | | | MDEV-15091 : Windows, 64bit: reenable and fix warning C4267 (conversion from ↵Vladislav Vaintroub2018-02-061-19/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'size_t' to 'type', possible loss of data) Handle string length as size_t, consistently (almost always:)) Change function prototypes to accept size_t, where in the past ulong or uint were used. change local/member variables to size_t when appropriate. This fix excludes rocksdb, spider,spider, sphinx and connect for now.
* | | | Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3Alexander Barkov2018-01-293-10/+10
|\ \ \ \ | |/ / /
| * | | Fix and reenable Windows compiler warning C4800 (size_t conversion).Vladislav Vaintroub2018-01-263-10/+10
| | | |
* | | | MDEV-14113 Use abortive TCP close, in case server closes the connectionVladislav Vaintroub2017-12-111-40/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | first, and we do not not care whether client has received all data. This is a TCP optimization to avoid TIME_WAIT in TCP connection teardown. This patch would abort connection on timeout, which usually happens when client reads a large result set, at slower pace then the server can write. The patch also cleans up socket timeout handling, so that Windows is consistent with another platforms (using nonblocking socket IO + waiting in poll/select on single socket, rather than setsockopt). This makes identifying timeouts easier. Also removed the superficial shutdown() before closesocket() in a few places where it was used, because it was never needed , and reportedly breaks SO_LINGER on Windows.
* | | | MDEV-14412 Support TCP keepalive optionsVladislav Vaintroub2017-11-171-0/+58
| | | | | | | | | | | | | | | | | | | | Based on pull request by Oleg Obleukhov https://github.com/MariaDB/server/pull/400
* | | | Merge bb-10.2-ext into 10.3Marko Mäkelä2017-10-044-24/+24
|\ \ \ \ | |/ / /
| * | | MDEV-13844 : Fix Windows warnings. Fix DBUG_PRINT.Vladislav Vaintroub2017-09-284-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fix win64 pointer truncation warnings (usually coming from misusing 0x%lx and long cast in DBUG) - Also fix printf-format warnings Make the above mentioned warnings fatal. - fix pthread_join on Windows to set return value.
* | | | Merge bb-10.2-ext into 10.3Marko Mäkelä2017-09-211-4/+0
|\ \ \ \ | |/ / /
| * | | Merge branch '10.1' into 10.2Vicențiu Ciorbaru2017-09-191-4/+0
| |\ \ \ | | |/ /
| | * | Merge branch '10.0' into 10.1Vicențiu Ciorbaru2017-09-191-4/+0
| | |\ \
| | | * | Build improvements and cleanups.Vladislav Vaintroub2017-09-081-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - the probably ultimate fix for dependencies on VS - remove some GET_TARGET_PROPERTY(LOCATION ...), they are deprecated in cmake 3.9 - simplify signing targets on Windows. - remove INSTALL_DEBUG_TARGET, we do not mix binaries from different builds in the same package
* | | | | MDEV-11159 Server proxy protocol supportVladislav Vaintroub2017-08-221-1/+1
|/ / / / | | | | | | | | | | | | | | | | | | | | accept proxy protocol header from client connections. The new server variable 'proxy_protocol_networks' contains list of networks from which proxy header is accepted.
* | | | MDEV-10332 support for OpenSSL 1.1 and LibreSSLSergei Golubchik2017-05-092-62/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | post-review fixes: * move all ssl implementation related ifdefs/defines to one file (ssl_compat.h) * work around OpenSSL-1.1 desire to malloc every EVP context by run-time checking that context allocated on the stack is big enough (openssl.c) * use newer version of the AWS SDK for OpenSSL 1.1 * use get_dh2048() function as generated by openssl 1.1 (viosslfactories.c)
* | | | MDEV-10332 support for OpenSSL 1.1 and LibreSSLGeorg Richter2017-05-091-16/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initial support tested against OpenSSL 1.0.1, 1.0.2, 1.1.0, Yassl and LibreSSL not working on Windows with native SChannel support, due to wrong cipher mapping: Latter one requires push of CONC-241 fixes. Please note that OpenSSL 0.9.8 and OpenSSL 1.1.0 will not work: Even if the build succeeds, test cases will fail with various errors, especially when using different tls libraries or versions for client and server.
* | | | Merge branch '10.1' into 10.2Sergei Golubchik2016-09-091-2/+24
|\ \ \ \ | |/ / /
| * | | Merge branch '10.0' into 10.1Sergei Golubchik2016-08-251-2/+24
| |\ \ \ | | |/ /
| | * | Cleanups and minor fixesMonty2016-08-211-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fixed typos - Added --core-on-failure to mysql-test-run - More DBUG_PRINT in viosocket.c - Don't forget CLIENT_REMEMBER_OPTIONS for compressed slave protocol - Removed not used stage variables
* | | | Merge branch '10.1' into 10.2Sergei Golubchik2016-06-301-3/+3
|\ \ \ \ | |/ / /
| * | | Merge branch '10.0' into 10.1Sergei Golubchik2016-06-281-3/+3
| |\ \ \ | | |/ /
| | * | Merge branch '5.5' into bb-10.0Sergei Golubchik2016-06-211-3/+3
| | |\ \ | | | |/
| | | * Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2016-06-141-3/+3
| | | |\
| | | | * Bug#21920657: SSL-CA FAILS SILENTLY IF THE PATH CANNOT BEArun Kuruvila2016-03-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FOUND Description:- Failure during the validation of CA certificate path which is provided as an option for 'ssl-ca' returns two different errors for YaSSL and OPENSSL. Analysis:- 'ssl-ca', option used for specifying the ssl ca certificate path. Failing to validate this certificate with OPENSSL returns an error, "ERROR 2026 (HY000): SSL connection error: SSL_CTX_set_default_verify_paths failed". While YASSL returns "ERROR 2026 (HY000): SSL connection error: ASN: bad other signature confirmation". Error returned by the OPENSSL is correct since "SSL_CTX_load_verify_locations()" returns 0 (in case of OPENSSL) for the failure and sets error as "SSL_INITERR_BAD_PATHS". In case of YASSL, "SSL_CTX_load_verify_locations()" returns an error number which is less than or equal to 0 in case of error. Error numbers for YASSL is mentioned in the file, 'extra/yassl/include/openssl/ssl.h'(line no : 292). Also 'ssl-ca' does not accept tilde home directory path substitution. Fix:- The condition which checks for the error in the "SSL_CTX_load_verify_locations()" is changed in order to accommodate YASSL as well. A logic is written in "mysql_ssl_set()" in order accept the tilde home directory path substitution for all ssl options.
| | | | * Bug #21221862 NEWEST RHEL/CENTOS OPENSSL UPDATE BREAKS MYSQL DHE CIPHERSV S Murthy Sidagam2015-06-191-15/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Description: The newest RHEL/CentOS/SL 6.6 openssl package (1.0.1e-30.el6_6.9; published around 6/4/2015) contains a fix for LogJam. RedHat's fix for this was to limit the use of any SSL DH key sizes to a minimum of 768 bits. This breaks any DHE SSL ciphers for MySQL clients as soon as you install the openssl update, since in vio/viosslfactories.c, the default DHPARAM is a 512 bit one. This cannot be changed in configuration/runtime; and needs a recompile. Because of this the client connection with --ssl-cipher=DHE-RSA-AES256-SHA is not able to connect the server. Analysis: Openssl has changed Diffie-Hellman key from the 512 to 1024 due to some reasons(please see the details at http://openssl.org/news/secadv_20150611.txt) Because of this the client with DHE cipher is failing to connect the server. This change took place from the openssl-1.0.1n onwards. Fix: Similar bug fix is already pushed to mysql-5.7 under bug#18367167. Hence we backported the same fix to mysql-5.5 and mysql-5.6.
| | | | * Bug #16861371 SSL_OP_NO_COMPRESSION NOT DEFINEDV S Murthy Sidagam2015-04-211-1/+1
| | | | | | | | | | | | | | | | | | | | post push change: fixing valgrind failures
| | | | * Bug #16861371 SSL_OP_NO_COMPRESSION NOT DEFINEDV S Murthy Sidagam2015-04-201-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | post push change: missed the change in mysql-5.5 (Fixing compiler warning/error)
| | | | * Bug #16861371 SSL_OP_NO_COMPRESSION NOT DEFINEDV S Murthy Sidagam2015-04-201-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Description: Can't build mysql-5.5 latest source with openssl 0.9.8e. Analysis: Older OpenSSL versions(prior to openssl 1.0) doesn't have 'SSL_OP_NO_COMPRESSION' defined. Hence the build is failing with SSL_OP_NO_COMPRESSION undeclared. Fix: Added a conditonal compilation for 'SSL_OP_NO_COMPRESSION'. i.e if 'SSL_OP_NO_COMPRESSION' is defined then have the SSL_set_options call for OpenSSL 1.0 versions. Have sk_SSL_COMP_zero() call for OpenSSL 0.9.8 version
* | | | | MDEV-9154 : Remove workarounds (mainly dynamic function loading)Vladislav Vaintroub2016-06-012-49/+2
|/ / / / | | | | | | | | | | | | for running obsolete versions of Windows
* | | | Merge branch '10.0' into 10.1Sergei Golubchik2016-02-231-0/+4
|\ \ \ \ | |/ / /
| * | | Merge branch '5.5' into 10.0Sergei Golubchik2016-02-151-0/+4
| |\ \ \ | | |/ /