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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
7229f853
Commit
7229f853
authored
Aug 25, 2002
by
monty@mashka.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't require call to mysql_ssl_set() to use ssl.
parent
791215f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
libmysql/libmysql.c
libmysql/libmysql.c
+16
-7
No files found.
libmysql/libmysql.c
View file @
7229f853
...
...
@@ -1444,11 +1444,6 @@ mysql_ssl_set(MYSQL *mysql __attribute__((unused)) ,
mysql
->
options
.
ssl_ca
=
strdup_if_not_null
(
ca
);
mysql
->
options
.
ssl_capath
=
strdup_if_not_null
(
capath
);
mysql
->
options
.
ssl_cipher
=
strdup_if_not_null
(
cipher
);
mysql
->
connector_fd
=
(
gptr
)
new_VioSSLConnectorFd
(
key
,
cert
,
ca
,
capath
,
cipher
);
DBUG_PRINT
(
"info"
,(
"mysql_ssl_set, context: %p"
,
((
struct
st_VioSSLConnectorFd
*
)
(
mysql
->
connector_fd
))
->
ssl_context_
));
#endif
return
0
;
}
...
...
@@ -1863,6 +1858,7 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
*/
if
(
client_flag
&
CLIENT_SSL
)
{
struct
st_mysql_options
*
options
=
&
mysql
->
options
;
if
(
my_net_write
(
net
,
buff
,(
uint
)
(
2
))
||
net_flush
(
net
))
{
net
->
last_errno
=
CR_SERVER_LOST
;
...
...
@@ -1870,9 +1866,22 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
goto
error
;
}
/* Do the SSL layering. */
if
(
!
(
mysql
->
connector_fd
=
(
gptr
)
new_VioSSLConnectorFd
(
options
->
ssl_key
,
options
->
ssl_cert
,
options
->
ssl_ca
,
options
->
ssl_capath
,
options
->
ssl_cipher
)))
{
/* TODO: Change to SSL error */
net
->
last_errno
=
CR_SERVER_LOST
;
strmov
(
net
->
last_error
,
ER
(
net
->
last_errno
));
goto
error
;
}
DBUG_PRINT
(
"info"
,
(
"IO layer change in progress..."
));
DBUG_PRINT
(
"info"
,
(
"IO context %p"
,((
struct
st_VioSSLConnectorFd
*
)
mysql
->
connector_fd
)
->
ssl_context_
));
sslconnect
((
struct
st_VioSSLConnectorFd
*
)(
mysql
->
connector_fd
),
mysql
->
net
.
vio
,
(
long
)(
mysql
->
options
.
connect_timeout
));
/* TODO: Add proper error checking here, with return error message */
sslconnect
((
struct
st_VioSSLConnectorFd
*
)(
mysql
->
connector_fd
),
mysql
->
net
.
vio
,
(
long
)
(
mysql
->
options
.
connect_timeout
));
DBUG_PRINT
(
"info"
,
(
"IO layer change done!"
));
}
#endif
/* HAVE_OPENSSL */
...
...
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