[Pkg-mysql-commits] r1144 - in trunk/debian: . patches

Norbert Tretkowski nobse at alioth.debian.org
Thu Feb 7 08:16:22 UTC 2008


Author: nobse
Date: 2008-02-07 08:16:22 +0000 (Thu, 07 Feb 2008)
New Revision: 1144

Modified:
   trunk/debian/changelog
   trunk/debian/patches/54_ssl-client-support.dpatch
Log:
Replace 54_ssl-client-support.dpatch added in 5.0.51-2 with patch from upstream.

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2008-02-06 17:55:28 UTC (rev 1143)
+++ trunk/debian/changelog	2008-02-07 08:16:22 UTC (rev 1144)
@@ -1,3 +1,10 @@
+mysql-dfsg-5.0 (5.0.51a-2) unstable; urgency=low
+
+  * Replace 54_ssl-client-support.dpatch added in 5.0.51-2 with patch from
+    upstream.
+
+ -- Norbert Tretkowski <nobse at debian.org>  Thu, 07 Feb 2008 09:15:43 +0100
+
 mysql-dfsg-5.0 (5.0.51a-1) unstable; urgency=low
 
   [ Norbert Tretkowski ]

Modified: trunk/debian/patches/54_ssl-client-support.dpatch
===================================================================
--- trunk/debian/patches/54_ssl-client-support.dpatch	2008-02-06 17:55:28 UTC (rev 1143)
+++ trunk/debian/patches/54_ssl-client-support.dpatch	2008-02-07 08:16:22 UTC (rev 1144)
@@ -5,10 +5,11 @@
 ## DP: http://bugs.mysql.com/bug.php?id=33292
 
 @DPATCH@
-diff -urN mysql-5.0.51.org/vio/viossl.c mysql-5.0.51/vio/viossl.c
---- mysql-5.0.51.org/vio/viossl.c	2007-11-15 15:07:13.000000000 +0100
-+++ mysql-5.0.51/vio/viossl.c	2007-12-20 22:56:38.660942731 +0100
-@@ -172,20 +172,14 @@
+
+diff -Nrup a/vio/viossl.c b/vio/viossl.c
+--- a/vio/viossl.c	2007-08-28 11:34:42 +02:00
++++ b/vio/viossl.c	2008-02-07 08:48:27 +01:00
+@@ -172,20 +172,15 @@ void vio_ssl_delete(Vio *vio)
    vio_delete(vio);
  }
  
@@ -18,48 +19,62 @@
 -  DBUG_RETURN(sslconnect(ptr, vio, timeout));
 -}
 -
--
+ 
 -int sslconnect(struct st_VioSSLFd *ptr, Vio *vio, long timeout)
-+static
-+int sslprocess(struct st_VioSSLFd *ptr, Vio *vio, long timeout, my_bool accept)
++static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout,
++                  int (*connect_accept_func)(SSL*))
  {
    SSL *ssl;
    my_bool unused;
    my_bool was_blocking;
  
 -  DBUG_ENTER("sslconnect");
-+  DBUG_ENTER("sslprocess");
++  DBUG_ENTER("ssl_do");
    DBUG_PRINT("enter", ("ptr: 0x%lx, sd: %d  ctx: 0x%lx",
                         (long) ptr, vio->sd, (long) ptr->ssl_context));
  
-@@ -201,6 +195,12 @@
-   }
-   DBUG_PRINT("info", ("ssl: 0x%lx timeout: %ld", (long) ssl, timeout));
-   SSL_clear(ssl);
-+
-+  if (accept)
-+	  SSL_set_accept_state(ssl);
-+  else
-+	  SSL_set_connect_state(ssl);
-+
+@@ -204,13 +199,9 @@ int sslconnect(struct st_VioSSLFd *ptr, 
    SSL_SESSION_set_timeout(SSL_get_session(ssl), timeout);
    SSL_set_fd(ssl, vio->sd);
  
-@@ -258,6 +258,17 @@
-   DBUG_RETURN(0);
+-  /*
+-    SSL_do_handshake will select between SSL_connect
+-    or SSL_accept depending on server or client side
+-  */
+-  if (SSL_do_handshake(ssl) < 1)
++  if (connect_accept_func(ssl) < 1)
+   {
+-    DBUG_PRINT("error", ("SSL_do_handshake failure"));
++    DBUG_PRINT("error", ("SSL_connect/accept failure"));
+     report_errors(ssl);
+     SSL_free(ssl);
+     vio_blocking(vio, was_blocking, &unused);
+@@ -259,6 +250,20 @@ int sslconnect(struct st_VioSSLFd *ptr, 
  }
  
+ 
 +int sslaccept(struct st_VioSSLFd *ptr, Vio *vio, long timeout)
 +{
 +  DBUG_ENTER("sslaccept");
-+  DBUG_RETURN(sslprocess(ptr, vio, timeout, TRUE));
++  DBUG_RETURN(ssl_do(ptr, vio, timeout, SSL_accept));
 +}
 +
++
 +int sslconnect(struct st_VioSSLFd *ptr, Vio *vio, long timeout)
 +{
 +  DBUG_ENTER("sslconnect");
-+  DBUG_RETURN(sslprocess(ptr, vio, timeout, FALSE));
++  DBUG_RETURN(ssl_do(ptr, vio, timeout, SSL_connect));
 +}
- 
++
++
  int vio_ssl_blocking(Vio *vio __attribute__((unused)),
  		     my_bool set_blocking_mode,
+ 		     my_bool *old_mode)
+@@ -268,5 +273,7 @@ int vio_ssl_blocking(Vio *vio __attribut
+   /* Return error if we try to change to non_blocking mode */
+   return (set_blocking_mode ? 0 : 1);
+ }
++
++
+ 
+ #endif /* HAVE_OPENSSL */




More information about the Pkg-mysql-commits mailing list