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
102cabfe
Commit
102cabfe
authored
Sep 01, 2001
by
tonu@x153.internalnet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed compilation problems when HAVE_OPENSSL is not defined
parent
6e685042
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
20 deletions
+20
-20
client/mysql.cc
client/mysql.cc
+6
-0
include/mysql.h
include/mysql.h
+0
-3
libmysql/libmysql.c
libmysql/libmysql.c
+12
-17
sql/mysqld.cc
sql/mysqld.cc
+2
-0
No files found.
client/mysql.cc
View file @
102cabfe
...
...
@@ -377,6 +377,9 @@ sig_handler mysql_end(int sig)
{
if
(
connected
)
mysql_close
(
&
mysql
);
else
mysql_ssl_clear
(
&
mysql
);
/* SSL data structres should be freed
even if connection was not made */
#ifdef HAVE_READLINE
if
(
!
status
.
batch
&&
!
quick
&&
!
opt_html
&&
!
opt_xml
)
{
...
...
@@ -2204,6 +2207,9 @@ sql_real_connect(char *host,char *database,char *user,char *password,
mysql_close
(
&
mysql
);
connected
=
0
;
}
else
mysql_ssl_clear
(
&
mysql
);
/* SSL data structres should be freed
even if connection was not made */
mysql_init
(
&
mysql
);
if
(
opt_connect_timeout
)
{
...
...
include/mysql.h
View file @
102cabfe
...
...
@@ -256,13 +256,10 @@ unsigned long STDCALL mysql_thread_id(MYSQL *mysql);
const
char
*
STDCALL
mysql_character_set_name
(
MYSQL
*
mysql
);
MYSQL
*
STDCALL
mysql_init
(
MYSQL
*
mysql
);
#ifdef HAVE_OPENSSL
int
STDCALL
mysql_ssl_set
(
MYSQL
*
mysql
,
const
char
*
key
,
const
char
*
cert
,
const
char
*
ca
,
const
char
*
capath
);
char
*
STDCALL
mysql_ssl_cipher
(
MYSQL
*
mysql
);
int
STDCALL
mysql_ssl_clear
(
MYSQL
*
mysql
);
#endif
/* HAVE_OPENSSL */
my_bool
STDCALL
mysql_change_user
(
MYSQL
*
mysql
,
const
char
*
user
,
const
char
*
passwd
,
const
char
*
db
);
MYSQL
*
STDCALL
mysql_real_connect
(
MYSQL
*
mysql
,
const
char
*
host
,
...
...
libmysql/libmysql.c
View file @
102cabfe
...
...
@@ -1359,16 +1359,19 @@ static void mysql_once_init()
#endif
}
#ifdef HAVE_OPENSSL
/**************************************************************************
** Fill in SSL part of MYSQL structure and set 'use_ssl' flag.
** NB! Errors are not reported until you do mysql_real_connect.
**************************************************************************/
int
STDCALL
mysql_ssl_set
(
MYSQL
*
mysql
,
const
char
*
key
,
const
char
*
cert
,
const
char
*
ca
,
const
char
*
capath
)
mysql_ssl_set
(
MYSQL
*
mysql
__attribute__
((
unused
))
,
const
char
*
key
__attribute__
((
unused
)),
const
char
*
cert
__attribute__
((
unused
)),
const
char
*
ca
__attribute__
((
unused
)),
const
char
*
capath
__attribute__
((
unused
)))
{
#ifdef HAVE_OPENSSL
mysql
->
options
.
ssl_key
=
key
==
0
?
0
:
my_strdup
(
key
,
MYF
(
0
));
mysql
->
options
.
ssl_cert
=
cert
==
0
?
0
:
my_strdup
(
cert
,
MYF
(
0
));
mysql
->
options
.
ssl_ca
=
ca
==
0
?
0
:
my_strdup
(
ca
,
MYF
(
0
));
...
...
@@ -1376,28 +1379,20 @@ mysql_ssl_set(MYSQL *mysql, const char *key, const char *cert,
mysql
->
options
.
use_ssl
=
TRUE
;
mysql
->
connector_fd
=
(
gptr
)
new_VioSSLConnectorFd
(
key
,
cert
,
ca
,
capath
);
DBUG_PRINT
(
"info"
,(
"mysql_ssl_set, context: %p"
,((
struct
st_VioSSLConnectorFd
*
)(
mysql
->
connector_fd
))
->
ssl_context_
));
#endif
return
0
;
}
/**************************************************************************
**************************************************************************
char * STDCALL
mysql_ssl_cipher(MYSQL *mysql)
{
return (char *)mysql->net.vio->cipher_description();
}
**************************************************************************
/*
***************************************************************************
** Free strings in the SSL structure and clear 'use_ssl' flag.
** NB! Errors are not reported until you do mysql_real_connect.
**************************************************************************
*/
int
STDCALL
mysql_ssl_clear
(
MYSQL
*
mysql
)
mysql_ssl_clear
(
MYSQL
*
mysql
__attribute__
((
unused
))
)
{
#ifdef HAVE_OPENSSL
my_free
(
mysql
->
options
.
ssl_key
,
MYF
(
MY_ALLOW_ZERO_PTR
));
my_free
(
mysql
->
options
.
ssl_cert
,
MYF
(
MY_ALLOW_ZERO_PTR
));
my_free
(
mysql
->
options
.
ssl_ca
,
MYF
(
MY_ALLOW_ZERO_PTR
));
...
...
@@ -1409,9 +1404,9 @@ mysql_ssl_clear(MYSQL *mysql)
mysql
->
options
.
use_ssl
=
FALSE
;
my_free
(
mysql
->
connector_fd
,
MYF
(
MY_ALLOW_ZERO_PTR
));
mysql
->
connector_fd
=
0
;
#endif
/* HAVE_OPENSSL */
return
0
;
}
#endif
/* HAVE_OPENSSL */
/**************************************************************************
** Connect to sql server
...
...
sql/mysqld.cc
View file @
102cabfe
...
...
@@ -1991,7 +1991,9 @@ The server will not act as a slave.");
if
(
hEventShutdown
)
CloseHandle
(
hEventShutdown
);
}
#endif
#ifdef HAVE_OPENSSL
my_free
((
gptr
)
ssl_acceptor_fd
,
MYF
(
0
));
#endif
/* HAVE_OPENSSL */
/* Wait until cleanup is done */
(
void
)
pthread_mutex_lock
(
&
LOCK_thread_count
);
while
(
!
ready_to_exit
)
...
...
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