1 From: msvenssonDate: February 7 2008 8:48am
2 Subject: bk commit into 5.0 tree (msvensson:1.2573) BUG#33050
4 Below is the list of changes that have just been committed into a local
5 5.0 repository of msvensson. When msvensson does a push these changes
6 will be propagated to the main repository and, within 24 hours after the
7 push, to the public repository.
8 For information on how to access the public repository
9 see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
11 ChangeSet@stripped, 2008-02-07 08:48:28+01:00, msvensson@stripped +1 -0
12 Bug#33050 5.0.50 fails many SSL testcases
14 vio/viossl.c@stripped, 2008-02-07 08:48:27+01:00, msvensson@stripped +21 -14
15 Bug#33050 5.0.50 fails many SSL testcases
17 diff -Nrup a/vio/viossl.c b/vio/viossl.c
18 --- a/vio/viossl.c 2007-08-28 11:34:42 +02:00
19 +++ b/vio/viossl.c 2008-02-07 08:48:27 +01:00
20 @@ -172,20 +172,15 @@ void vio_ssl_delete(Vio *vio)
24 -int sslaccept(struct st_VioSSLFd *ptr, Vio *vio, long timeout)
26 - DBUG_ENTER("sslaccept");
27 - DBUG_RETURN(sslconnect(ptr, vio, timeout));
31 -int sslconnect(struct st_VioSSLFd *ptr, Vio *vio, long timeout)
32 +static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout,
33 + int (*connect_accept_func)(SSL*))
39 - DBUG_ENTER("sslconnect");
40 + DBUG_ENTER("ssl_do");
41 DBUG_PRINT("enter", ("ptr: 0x%lx, sd: %d ctx: 0x%lx",
42 (long) ptr, vio->sd, (long) ptr->ssl_context));
44 @@ -204,13 +199,9 @@ int sslconnect(struct st_VioSSLFd *ptr,
45 SSL_SESSION_set_timeout(SSL_get_session(ssl), timeout);
46 SSL_set_fd(ssl, vio->sd);
49 - SSL_do_handshake will select between SSL_connect
50 - or SSL_accept depending on server or client side
52 - if (SSL_do_handshake(ssl) < 1)
53 + if (connect_accept_func(ssl) < 1)
55 - DBUG_PRINT("error", ("SSL_do_handshake failure"));
56 + DBUG_PRINT("error", ("SSL_connect/accept failure"));
59 vio_blocking(vio, was_blocking, &unused);
60 @@ -259,6 +250,20 @@ int sslconnect(struct st_VioSSLFd *ptr,
64 +int sslaccept(struct st_VioSSLFd *ptr, Vio *vio, long timeout)
66 + DBUG_ENTER("sslaccept");
67 + DBUG_RETURN(ssl_do(ptr, vio, timeout, SSL_accept));
71 +int sslconnect(struct st_VioSSLFd *ptr, Vio *vio, long timeout)
73 + DBUG_ENTER("sslconnect");
74 + DBUG_RETURN(ssl_do(ptr, vio, timeout, SSL_connect));
78 int vio_ssl_blocking(Vio *vio __attribute__((unused)),
79 my_bool set_blocking_mode,
81 @@ -268,5 +273,7 @@ int vio_ssl_blocking(Vio *vio __attribut
82 /* Return error if we try to change to non_blocking mode */
83 return (set_blocking_mode ? 0 : 1);
88 #endif /* HAVE_OPENSSL */