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
800725af
Commit
800725af
authored
Feb 07, 2008
by
msvensson@pilot.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge pilot.mysql.com:/data/msvensson/mysql/bug25988/my50-bug25988
into pilot.mysql.com:/data/msvensson/mysql/mysql-5.0-build
parents
e2b16eca
c409f206
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
14 deletions
+21
-14
vio/viossl.c
vio/viossl.c
+21
-14
No files found.
vio/viossl.c
View file @
800725af
...
...
@@ -172,20 +172,15 @@ void vio_ssl_delete(Vio *vio)
vio_delete
(
vio
);
}
int
sslaccept
(
struct
st_VioSSLFd
*
ptr
,
Vio
*
vio
,
long
timeout
)
{
DBUG_ENTER
(
"sslaccept"
);
DBUG_RETURN
(
sslconnect
(
ptr
,
vio
,
timeout
));
}
int
sslconnect
(
struct
st_VioSSLFd
*
ptr
,
Vio
*
vio
,
long
timeout
)
static
int
ssl_do
(
struct
st_VioSSLFd
*
ptr
,
Vio
*
vio
,
long
timeout
,
int
(
*
connect_accept_func
)(
SSL
*
))
{
SSL
*
ssl
;
my_bool
unused
;
my_bool
was_blocking
;
DBUG_ENTER
(
"ssl
connect
"
);
DBUG_ENTER
(
"ssl
_do
"
);
DBUG_PRINT
(
"enter"
,
(
"ptr: 0x%lx, sd: %d ctx: 0x%lx"
,
(
long
)
ptr
,
vio
->
sd
,
(
long
)
ptr
->
ssl_context
));
...
...
@@ -204,13 +199,9 @@ int sslconnect(struct st_VioSSLFd *ptr, Vio *vio, long timeout)
SSL_SESSION_set_timeout
(
SSL_get_session
(
ssl
),
timeout
);
SSL_set_fd
(
ssl
,
vio
->
sd
);
/*
SSL_do_handshake will select between SSL_connect
or SSL_accept depending on server or client side
*/
if
(
SSL_do_handshake
(
ssl
)
<
1
)
if
(
connect_accept_func
(
ssl
)
<
1
)
{
DBUG_PRINT
(
"error"
,
(
"SSL_
do_handshake
failure"
));
DBUG_PRINT
(
"error"
,
(
"SSL_
connect/accept
failure"
));
report_errors
(
ssl
);
SSL_free
(
ssl
);
vio_blocking
(
vio
,
was_blocking
,
&
unused
);
...
...
@@ -259,6 +250,20 @@ int sslconnect(struct st_VioSSLFd *ptr, Vio *vio, long timeout)
}
int
sslaccept
(
struct
st_VioSSLFd
*
ptr
,
Vio
*
vio
,
long
timeout
)
{
DBUG_ENTER
(
"sslaccept"
);
DBUG_RETURN
(
ssl_do
(
ptr
,
vio
,
timeout
,
SSL_accept
));
}
int
sslconnect
(
struct
st_VioSSLFd
*
ptr
,
Vio
*
vio
,
long
timeout
)
{
DBUG_ENTER
(
"sslconnect"
);
DBUG_RETURN
(
ssl_do
(
ptr
,
vio
,
timeout
,
SSL_connect
));
}
int
vio_ssl_blocking
(
Vio
*
vio
__attribute__
((
unused
)),
my_bool
set_blocking_mode
,
my_bool
*
old_mode
)
...
...
@@ -269,4 +274,6 @@ int vio_ssl_blocking(Vio *vio __attribute__((unused)),
return
(
set_blocking_mode
?
0
:
1
);
}
#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