List:Commits« Previous MessageNext Message »
From:Georgi Kodinov Date:March 8 2012 3:08pm
Subject:bzr push into mysql-trunk branch (Georgi.Kodinov:3734 to 3735) Bug#13799126
View as plain text  
 3735 Georgi Kodinov	2012-03-08
      Addendum to the fix for bug #13799126:
      
      Since converting const to non-const appears to
      be triggering compilation errors on some platform
      made the parameter to the static function a boolean
      instead of an SSL type and depending on the 
      value of the boolean added a call to the appropriate
      function inline.
      With this the need to know the const-abiliy of this
      particular function no longer exists.

    modified:
      vio/viosslfactories.c
 3734 Georgi Kodinov	2012-03-05
      Bug #13799126: VIOSSLFACTORIES DOES NOT COMPILE ON ORACLE LINUX 6.0 
      WITH SSL=SYSTEM
      
      The newer SSL version used in this OS requires that a const predicate is added 
      to one of the internal function signatures.
      It's safe to add a const to this function since the variable is uses as a constant
      and it's safe to convert from a non-const to const.

    modified:
      vio/viosslfactories.c
=== modified file 'vio/viosslfactories.c'
--- a/vio/viosslfactories.c	2012-03-05 17:19:51 +0000
+++ b/vio/viosslfactories.c	2012-03-08 14:36:37 +0000
@@ -164,7 +164,7 @@ static void check_ssl_init()
 static struct st_VioSSLFd *
 new_VioSSLFd(const char *key_file, const char *cert_file,
              const char *ca_file, const char *ca_path,
-             const char *cipher, const SSL_METHOD *method, 
+             const char *cipher, my_bool is_client,
              enum enum_ssl_init_error *error,
              const char *crl_file, const char *crl_path)
 {
@@ -188,7 +188,9 @@ new_VioSSLFd(const char *key_file, const
                  my_malloc(sizeof(struct st_VioSSLFd),MYF(0)))))
     DBUG_RETURN(0);
 
-  if (!(ssl_fd->ssl_context= SSL_CTX_new(method)))
+  if (!(ssl_fd->ssl_context= SSL_CTX_new(is_client ?
+                                         TLSv1_client_method() :
+                                         TLSv1_server_method())))
   {
     *error= SSL_INITERR_MEMFAIL;
     DBUG_PRINT("error", ("%s", sslGetErrString(*error)));
@@ -290,7 +292,7 @@ new_VioSSLConnectorFd(const char *key_fi
     verify= SSL_VERIFY_NONE;
 
   if (!(ssl_fd= new_VioSSLFd(key_file, cert_file, ca_file,
-                             ca_path, cipher, TLSv1_client_method(), error,
+                             ca_path, cipher, TRUE, error,
                              crl_file, crl_path)))
   {
     return 0;
@@ -314,7 +316,7 @@ new_VioSSLAcceptorFd(const char *key_fil
   struct st_VioSSLFd *ssl_fd;
   int verify= SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE;
   if (!(ssl_fd= new_VioSSLFd(key_file, cert_file, ca_file,
-                             ca_path, cipher, TLSv1_server_method(), error,
+                             ca_path, cipher, FALSE, error,
                              crl_file, crl_path)))
   {
     return 0;

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (Georgi.Kodinov:3734 to 3735) Bug#13799126Georgi Kodinov9 Mar