summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorKonstantin Osipov <kostja@sun.com>2010-04-13 19:04:45 +0400
committerKonstantin Osipov <kostja@sun.com>2010-04-13 19:04:45 +0400
commit53fecff1ef023e5020d17dbe38ec8ee4fa499d12 (patch)
tree30820e84d6b99238e1ecd963c1995382a93a7cf6 /client
parent04b601a7fe4c87d0b72f8b14c306a14c005846d7 (diff)
downloadmariadb-git-53fecff1ef023e5020d17dbe38ec8ee4fa499d12.tar.gz
Backport of:
ChangeSet@1.2703, 2007-12-07 09:35:28-05:00, cmiller@zippy.cornsilk.net +40 -0 Bug#13174: SHA2 function Patch contributed from Bill Karwin, paper unnumbered CLA in Seattle Implement SHA2 functions. Chad added code to make it work with YaSSL. Also, he removed the (probable) bug of embedded server never using SSL-dependent functions. (libmysqld/Makefile.am didn't read ANY autoconf defs.) Function specification: SHA2( string cleartext, integer hash_length ) -> string hash, or NULL where hash_length is one of 224, 256, 384, or 512. If either is NULL or a length is unsupported, then the result is NULL. The resulting string is always the length of the hash_length parameter or is NULL. Include the canonical hash examples from the NIST in the test results. --- Polish and address concerns of reviewers.
Diffstat (limited to 'client')
-rw-r--r--client/mysql.cc6
-rw-r--r--client/mysqltest.cc4
2 files changed, 5 insertions, 5 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index 5e77b6e9d17..86094edc039 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -4300,7 +4300,7 @@ sql_real_connect(char *host,char *database,char *user,char *password,
mysql_options(&mysql, MYSQL_SECURE_AUTH, (char *) &opt_secure_auth);
if (using_opt_local_infile)
mysql_options(&mysql,MYSQL_OPT_LOCAL_INFILE, (char*) &opt_local_infile);
-#ifdef HAVE_OPENSSL
+#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
if (opt_use_ssl)
mysql_ssl_set(&mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca,
opt_ssl_capath, opt_ssl_cipher);
@@ -4421,12 +4421,12 @@ com_status(String *buffer __attribute__((unused)),
mysql_free_result(result);
}
-#ifdef HAVE_OPENSSL
+#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
if ((status_str= mysql_get_ssl_cipher(&mysql)))
tee_fprintf(stdout, "SSL:\t\t\tCipher in use is %s\n",
status_str);
else
-#endif /* HAVE_OPENSSL */
+#endif /* HAVE_OPENSSL && !EMBEDDED_LIBRARY */
tee_puts("SSL:\t\t\tNot in use", stdout);
if (skip_updates)
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index f7964cc27cc..24d520ff97f 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -5170,7 +5170,7 @@ void do_connect(struct st_command *command)
mysql_options(&con_slot->mysql, MYSQL_SET_CHARSET_DIR,
opt_charsets_dir);
-#ifdef HAVE_OPENSSL
+#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
if (opt_use_ssl || con_ssl)
{
mysql_ssl_set(&con_slot->mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca,
@@ -7916,7 +7916,7 @@ int main(int argc, char **argv)
mysql_options(&con->mysql, MYSQL_SET_CHARSET_DIR,
opt_charsets_dir);
-#ifdef HAVE_OPENSSL
+#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
if (opt_use_ssl)
{