summaryrefslogtreecommitdiff
path: root/vio
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-10-19 20:38:59 +0200
committerSergei Golubchik <sergii@pisem.net>2012-10-19 20:38:59 +0200
commite1f681c99b3e5462c033aaafa94ac295e626cde2 (patch)
tree2da5eff1a0d03831c2d85b32a7bc3df6ec37b522 /vio
parent52c84d144d3b07966d9b3bab8694eb012eef69ce (diff)
parent807fef40fffbbb8e92564a52b902b504ba8cfcdc (diff)
downloadmariadb-git-e1f681c99b3e5462c033aaafa94ac295e626cde2.tar.gz
10.0-base -> 10.0-monty
Diffstat (limited to 'vio')
-rw-r--r--vio/viosslfactories.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c
index 00c20d2d773..b0e64468a55 100644
--- a/vio/viosslfactories.c
+++ b/vio/viosslfactories.c
@@ -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, SSL_METHOD *method,
+ const char *cipher, my_bool is_client_method,
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 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)));
@@ -290,7 +292,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, TLSv1_client_method(), error,
+ ca_path, cipher, TRUE, error,
crl_file, crl_path)))
{
return 0;
@@ -314,8 +316,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,
crl_file, crl_path)))
{
return 0;