summaryrefslogtreecommitdiff
path: root/vio
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-08-22 11:40:39 +0200
committerSergei Golubchik <sergii@pisem.net>2012-08-22 11:40:39 +0200
commitcefc30b1663114930439e03dec245604bc904604 (patch)
tree83a4479fe38adb24e478dde743856f04d65fa801 /vio
parent34f2f8ea41726d98e50752ff3453ebde70912c35 (diff)
parent171355077501da7ddd32778ab3ebe77c5f7ce7da (diff)
downloadmariadb-git-cefc30b1663114930439e03dec245604bc904604.tar.gz
merge with MySQL 5.1.65
Diffstat (limited to 'vio')
-rw-r--r--vio/viosslfactories.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c
index 31863a0830f..945e288a799 100644
--- a/vio/viosslfactories.c
+++ b/vio/viosslfactories.c
@@ -201,7 +201,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, SSL_METHOD *method,
+ const char *cipher, my_bool is_client_method,
enum enum_ssl_init_error* error)
{
DH *dh;
@@ -222,7 +222,9 @@ new_VioSSLFd(const char *key_file, const char *cert_file,
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_method ?
+ TLSv1_client_method() :
+ TLSv1_server_method())))
{
*error= SSL_INITERR_MEMFAIL;
DBUG_PRINT("error", ("%s", sslGetErrString(*error)));
@@ -300,8 +302,7 @@ new_VioSSLConnectorFd(const char *key_file, const char *cert_file,
verify= SSL_VERIFY_NONE;
if (!(ssl_fd= new_VioSSLFd(key_file, cert_file, ca_file,
- ca_path, cipher,
- (SSL_METHOD*) TLSv1_client_method(), &dummy)))
+ ca_path, cipher, TRUE, &dummy)))
{
return 0;
}
@@ -323,8 +324,7 @@ new_VioSSLAcceptorFd(const char *key_file, const char *cert_file,
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,
- (SSL_METHOD*) TLSv1_server_method(), error)))
+ ca_path, cipher, FALSE, error)))
{
return 0;
}