diff options
author | unknown <msvensson@pilot.blaudden> | 2007-04-02 13:12:59 +0200 |
---|---|---|
committer | unknown <msvensson@pilot.blaudden> | 2007-04-02 13:12:59 +0200 |
commit | 8033d64e136cb9519d527c59062dc3d0f17adcac (patch) | |
tree | b1092170c954d2f4a090dc42561b3e380071f299 /vio | |
parent | 2bc57a692c228141a86d382019fad33a4a6ae9ea (diff) | |
download | mariadb-git-8033d64e136cb9519d527c59062dc3d0f17adcac.tar.gz |
Bug#21611 Slave can't connect when master-ssl-cipher specified
- Change check for return value of 'SSL_CTX_set_cipher_list'
in order to handle 0 as error setting cipher.
- Thanks to Dan Lukes for finding the problem!
mysql-test/r/openssl_1.result:
Update result
mysql-test/t/openssl_1.test:
Add test for setting ssl-cipher to be used
vio/viosslfactories.c:
Change error handling of SSL_CTX_set_cipher_list to
detect 0 as an error
Diffstat (limited to 'vio')
-rw-r--r-- | vio/viosslfactories.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c index 55d3792365f..40879da24ba 100644 --- a/vio/viosslfactories.c +++ b/vio/viosslfactories.c @@ -249,8 +249,13 @@ new_VioSSLFd(const char *key_file, const char *cert_file, DBUG_RETURN(0); } - /* Set the ciphers that can be used */ - if (cipher && SSL_CTX_set_cipher_list(ssl_fd->ssl_context, cipher)) + /* + Set the ciphers that can be used + NOTE: SSL_CTX_set_cipher_list will return 0 if + none of the provided ciphers could be selected + */ + if (cipher && + SSL_CTX_set_cipher_list(ssl_fd->ssl_context, cipher) == 0) { DBUG_PRINT("error", ("failed to set ciphers to use")); report_errors(); |