From 82b454aa28e46efa9249ee51784b654fbd0a9225 Mon Sep 17 00:00:00 2001 From: "msvensson@pilot.blaudden" <> Date: Mon, 2 Apr 2007 13:12:59 +0200 Subject: 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! --- vio/viosslfactories.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'vio/viosslfactories.c') 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(); -- cgit v1.2.1