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
8573bdbf
Commit
8573bdbf
authored
Jun 26, 2003
by
gluh@gluh.mysql.r18.ru
Browse files
Options
Browse Files
Download
Plain Diff
Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-4.0
into gluh.mysql.r18.ru:/home/gluh/mysql-4.0.for_fix
parents
ad5cbc02
7d43750e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
9 deletions
+17
-9
sql/sql_acl.cc
sql/sql_acl.cc
+5
-2
vio/viossl.c
vio/viossl.c
+2
-4
vio/viosslfactories.c
vio/viosslfactories.c
+10
-3
No files found.
sql/sql_acl.cc
View file @
8573bdbf
...
...
@@ -552,7 +552,9 @@ ulong acl_getroot(THD *thd, const char *host, const char *ip, const char *user,
We need to check for absence of SSL because without SSL
we should reject connection.
*/
if
(
vio_type
(
vio
)
==
VIO_TYPE_SSL
&&
SSL_get_peer_certificate
(
vio
->
ssl_
))
if
(
vio_type
(
vio
)
==
VIO_TYPE_SSL
&&
SSL_get_verify_result
(
vio
->
ssl_
)
==
X509_V_OK
&&
SSL_get_peer_certificate
(
vio
->
ssl_
))
user_access
=
acl_user
->
access
;
break
;
case
SSL_TYPE_SPECIFIED
:
/* Client should have specified attrib */
...
...
@@ -560,7 +562,8 @@ ulong acl_getroot(THD *thd, const char *host, const char *ip, const char *user,
We need to check for absence of SSL because without SSL
we should reject connection.
*/
if
(
vio_type
(
vio
)
==
VIO_TYPE_SSL
)
if
(
vio_type
(
vio
)
==
VIO_TYPE_SSL
&&
SSL_get_verify_result
(
vio
->
ssl_
)
==
X509_V_OK
)
{
if
(
acl_user
->
ssl_cipher
)
{
...
...
vio/viossl.c
View file @
8573bdbf
...
...
@@ -287,8 +287,7 @@ int sslaccept(struct st_VioSSLAcceptorFd* ptr, Vio* vio, long timeout)
SSL_SESSION_set_timeout
(
SSL_get_session
(
vio
->
ssl_
),
timeout
);
SSL_set_fd
(
vio
->
ssl_
,
vio
->
sd
);
SSL_set_accept_state
(
vio
->
ssl_
);
if
(
SSL_do_handshake
(
vio
->
ssl_
)
<
1
||
SSL_get_verify_result
(
vio
->
ssl_
)
!=
X509_V_OK
)
if
(
SSL_do_handshake
(
vio
->
ssl_
)
<
1
)
{
DBUG_PRINT
(
"error"
,
(
"SSL_do_handshake failure"
));
report_errors
();
...
...
@@ -361,8 +360,7 @@ int sslconnect(struct st_VioSSLConnectorFd* ptr, Vio* vio, long timeout)
SSL_SESSION_set_timeout
(
SSL_get_session
(
vio
->
ssl_
),
timeout
);
SSL_set_fd
(
vio
->
ssl_
,
vio
->
sd
);
SSL_set_connect_state
(
vio
->
ssl_
);
if
(
SSL_do_handshake
(
vio
->
ssl_
)
<
1
||
SSL_get_verify_result
(
vio
->
ssl_
)
!=
X509_V_OK
)
if
(
SSL_do_handshake
(
vio
->
ssl_
)
<
1
)
{
DBUG_PRINT
(
"error"
,
(
"SSL_do_handshake failure"
));
report_errors
();
...
...
vio/viosslfactories.c
View file @
8573bdbf
...
...
@@ -178,6 +178,11 @@ vio_verify_callback(int ok, X509_STORE_CTX *ctx)
/************************ VioSSLConnectorFd **********************************/
/*
TODO:
Add option --verify to mysql to be able to change verification mode
*/
struct
st_VioSSLConnectorFd
*
new_VioSSLConnectorFd
(
const
char
*
key_file
,
const
char
*
cert_file
,
...
...
@@ -185,7 +190,7 @@ new_VioSSLConnectorFd(const char* key_file,
const
char
*
ca_path
,
const
char
*
cipher
)
{
int
verify
=
SSL_VERIFY_
PEER
;
int
verify
=
SSL_VERIFY_
NONE
;
struct
st_VioSSLConnectorFd
*
ptr
;
int
result
;
DH
*
dh
=
NULL
;
...
...
@@ -264,7 +269,10 @@ ctor_failure:
/************************ VioSSLAcceptorFd **********************************/
/*
TODO:
Add option --verify to mysqld to be able to change verification mode
*/
struct
st_VioSSLAcceptorFd
*
new_VioSSLAcceptorFd
(
const
char
*
key_file
,
const
char
*
cert_file
,
...
...
@@ -273,7 +281,6 @@ new_VioSSLAcceptorFd(const char *key_file,
const
char
*
cipher
)
{
int
verify
=
(
SSL_VERIFY_PEER
|
SSL_VERIFY_FAIL_IF_NO_PEER_CERT
|
SSL_VERIFY_CLIENT_ONCE
);
struct
st_VioSSLAcceptorFd
*
ptr
;
int
result
;
...
...
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