Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
4b2a0f0c
Commit
4b2a0f0c
authored
Oct 12, 2005
by
gluh@eagle.intranet.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
after merge fix
parent
d19c8519
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
17 deletions
+19
-17
config/ac-macros/yassl.m4
config/ac-macros/yassl.m4
+1
-1
sql/mysqld.cc
sql/mysqld.cc
+18
-16
No files found.
config/ac-macros/yassl.m4
View file @
4b2a0f0c
...
@@ -20,7 +20,7 @@ AC_DEFUN([MYSQL_CHECK_YASSL], [
...
@@ -20,7 +20,7 @@ AC_DEFUN([MYSQL_CHECK_YASSL], [
-L\$(top_builddir)/extra/yassl/taocrypt/src -ltaocrypt"
-L\$(top_builddir)/extra/yassl/taocrypt/src -ltaocrypt"
openssl_includes="-I\$(top_srcdir)/extra/yassl/include"
openssl_includes="-I\$(top_srcdir)/extra/yassl/include"
AC_DEFINE([HAVE_OPENSSL], [1], [Defined by configure. Using yaSSL for OpenSSL emulation.])
AC_DEFINE([HAVE_OPENSSL], [1], [Defined by configure. Using yaSSL for OpenSSL emulation.])
AC_DEFINE([HAVE_YASSL], [1], [Defined by configure. Using yaSSL for OpenSSL emulation.])
# System specific checks
# System specific checks
yassl_integer_extra_cxxflags=""
yassl_integer_extra_cxxflags=""
case $host_cpu--$CXX_VERSION in
case $host_cpu--$CXX_VERSION in
...
...
sql/mysqld.cc
View file @
4b2a0f0c
...
@@ -580,21 +580,21 @@ HANDLE smem_event_connect_request= 0;
...
@@ -580,21 +580,21 @@ HANDLE smem_event_connect_request= 0;
#include "sslopt-vars.h"
#include "sslopt-vars.h"
#ifdef HAVE_OPENSSL
#ifdef HAVE_OPENSSL
#include <openssl/crypto.h>
#include <openssl/crypto.h>
#ifndef HAVE_YASSL
typedef
struct
CRYPTO_dynlock_value
typedef
struct
CRYPTO_dynlock_value
{
{
rw_lock_t
lock
;
rw_lock_t
lock
;
}
openssl_lock_t
;
}
openssl_lock_t
;
char
*
des_key_file
;
struct
st_VioSSLAcceptorFd
*
ssl_acceptor_fd
;
static
openssl_lock_t
*
openssl_stdlocks
;
static
openssl_lock_t
*
openssl_stdlocks
;
static
openssl_lock_t
*
openssl_dynlock_create
(
const
char
*
,
int
);
static
openssl_lock_t
*
openssl_dynlock_create
(
const
char
*
,
int
);
static
void
openssl_dynlock_destroy
(
openssl_lock_t
*
,
const
char
*
,
int
);
static
void
openssl_dynlock_destroy
(
openssl_lock_t
*
,
const
char
*
,
int
);
static
void
openssl_lock_function
(
int
,
int
,
const
char
*
,
int
);
static
void
openssl_lock_function
(
int
,
int
,
const
char
*
,
int
);
static
void
openssl_lock
(
int
,
openssl_lock_t
*
,
const
char
*
,
int
);
static
void
openssl_lock
(
int
,
openssl_lock_t
*
,
const
char
*
,
int
);
static
unsigned
long
openssl_id_function
();
static
unsigned
long
openssl_id_function
();
#endif
char
*
des_key_file
;
struct
st_VioSSLAcceptorFd
*
ssl_acceptor_fd
;
#endif
/* HAVE_OPENSSL */
#endif
/* HAVE_OPENSSL */
...
@@ -1184,10 +1184,12 @@ static void clean_up_mutexes()
...
@@ -1184,10 +1184,12 @@ static void clean_up_mutexes()
(
void
)
pthread_mutex_destroy
(
&
LOCK_user_conn
);
(
void
)
pthread_mutex_destroy
(
&
LOCK_user_conn
);
#ifdef HAVE_OPENSSL
#ifdef HAVE_OPENSSL
(
void
)
pthread_mutex_destroy
(
&
LOCK_des_key_file
);
(
void
)
pthread_mutex_destroy
(
&
LOCK_des_key_file
);
#ifndef HAVE_YASSL
for
(
int
i
=
0
;
i
<
CRYPTO_num_locks
();
++
i
)
for
(
int
i
=
0
;
i
<
CRYPTO_num_locks
();
++
i
)
(
void
)
rwlock_destroy
(
&
openssl_stdlocks
[
i
].
lock
);
(
void
)
rwlock_destroy
(
&
openssl_stdlocks
[
i
].
lock
);
OPENSSL_free
(
openssl_stdlocks
);
OPENSSL_free
(
openssl_stdlocks
);
#endif
#endif
#endif
#ifdef HAVE_REPLICATION
#ifdef HAVE_REPLICATION
(
void
)
pthread_mutex_destroy
(
&
LOCK_rpl_status
);
(
void
)
pthread_mutex_destroy
(
&
LOCK_rpl_status
);
(
void
)
pthread_cond_destroy
(
&
COND_rpl_status
);
(
void
)
pthread_cond_destroy
(
&
COND_rpl_status
);
...
@@ -2743,6 +2745,17 @@ static int init_thread_environment()
...
@@ -2743,6 +2745,17 @@ static int init_thread_environment()
(
void
)
pthread_mutex_init
(
&
LOCK_uuid_generator
,
MY_MUTEX_INIT_FAST
);
(
void
)
pthread_mutex_init
(
&
LOCK_uuid_generator
,
MY_MUTEX_INIT_FAST
);
#ifdef HAVE_OPENSSL
#ifdef HAVE_OPENSSL
(
void
)
pthread_mutex_init
(
&
LOCK_des_key_file
,
MY_MUTEX_INIT_FAST
);
(
void
)
pthread_mutex_init
(
&
LOCK_des_key_file
,
MY_MUTEX_INIT_FAST
);
#ifndef HAVE_YASSL
openssl_stdlocks
=
(
openssl_lock_t
*
)
OPENSSL_malloc
(
CRYPTO_num_locks
()
*
sizeof
(
openssl_lock_t
));
for
(
int
i
=
0
;
i
<
CRYPTO_num_locks
();
++
i
)
(
void
)
my_rwlock_init
(
&
openssl_stdlocks
[
i
].
lock
,
NULL
);
CRYPTO_set_dynlock_create_callback
(
openssl_dynlock_create
);
CRYPTO_set_dynlock_destroy_callback
(
openssl_dynlock_destroy
);
CRYPTO_set_dynlock_lock_callback
(
openssl_lock
);
CRYPTO_set_locking_callback
(
openssl_lock_function
);
CRYPTO_set_id_callback
(
openssl_id_function
);
#endif
#endif
#endif
(
void
)
my_rwlock_init
(
&
LOCK_sys_init_connect
,
NULL
);
(
void
)
my_rwlock_init
(
&
LOCK_sys_init_connect
,
NULL
);
(
void
)
my_rwlock_init
(
&
LOCK_sys_init_slave
,
NULL
);
(
void
)
my_rwlock_init
(
&
LOCK_sys_init_slave
,
NULL
);
...
@@ -2771,22 +2784,11 @@ static int init_thread_environment()
...
@@ -2771,22 +2784,11 @@ static int init_thread_environment()
sql_print_error
(
"Can't create thread-keys"
);
sql_print_error
(
"Can't create thread-keys"
);
return
1
;
return
1
;
}
}
#ifdef HAVE_OPENSSL
openssl_stdlocks
=
(
openssl_lock_t
*
)
OPENSSL_malloc
(
CRYPTO_num_locks
()
*
sizeof
(
openssl_lock_t
));
for
(
int
i
=
0
;
i
<
CRYPTO_num_locks
();
++
i
)
(
void
)
my_rwlock_init
(
&
openssl_stdlocks
[
i
].
lock
,
NULL
);
CRYPTO_set_dynlock_create_callback
(
openssl_dynlock_create
);
CRYPTO_set_dynlock_destroy_callback
(
openssl_dynlock_destroy
);
CRYPTO_set_dynlock_lock_callback
(
openssl_lock
);
CRYPTO_set_locking_callback
(
openssl_lock_function
);
CRYPTO_set_id_callback
(
openssl_id_function
);
#endif
return
0
;
return
0
;
}
}
#if
def HAVE_OPENSSL
#if
defined(HAVE_OPENSSL) && !defined(HAVE_YASSL)
static
unsigned
long
openssl_id_function
()
static
unsigned
long
openssl_id_function
()
{
{
return
(
unsigned
long
)
pthread_self
();
return
(
unsigned
long
)
pthread_self
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment