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
9ded00c2
Commit
9ded00c2
authored
Aug 31, 2001
by
tonu@x153.internalnet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SSL stuff fix
parent
22dbb425
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
27 deletions
+30
-27
sql/sql_acl.cc
sql/sql_acl.cc
+30
-27
No files found.
sql/sql_acl.cc
View file @
9ded00c2
...
@@ -62,7 +62,7 @@ class ACL_USER :public ACL_ACCESS
...
@@ -62,7 +62,7 @@ class ACL_USER :public ACL_ACCESS
char
*
user
,
*
password
;
char
*
user
,
*
password
;
ulong
salt
[
2
];
ulong
salt
[
2
];
#ifdef HAVE_OPENSSL
#ifdef HAVE_OPENSSL
char
*
ssl_type
,
*
ssl_cipher
,
*
ssl_issuer
,
*
ssl
_subject
;
char
*
ssl_type
,
*
ssl_cipher
,
*
x509_issuer
,
*
x509
_subject
;
#endif
#endif
};
};
...
@@ -203,10 +203,13 @@ int acl_init(bool dont_read_acl_tables)
...
@@ -203,10 +203,13 @@ int acl_init(bool dont_read_acl_tables)
user
.
user
=
get_field
(
&
mem
,
table
,
1
);
user
.
user
=
get_field
(
&
mem
,
table
,
1
);
user
.
password
=
get_field
(
&
mem
,
table
,
2
);
user
.
password
=
get_field
(
&
mem
,
table
,
2
);
#ifdef HAVE_OPENSSL
#ifdef HAVE_OPENSSL
DBUG_PRINT
(
"info"
,(
"table->fields=%d"
,
table
->
fields
));
if
(
table
->
fields
>=
21
)
{
user
.
ssl_type
=
get_field
(
&
mem
,
table
,
17
);
user
.
ssl_type
=
get_field
(
&
mem
,
table
,
17
);
user
.
ssl_cipher
=
get_field
(
&
mem
,
table
,
18
);
user
.
ssl_cipher
=
get_field
(
&
mem
,
table
,
18
);
user
.
ssl_issuer
=
get_field
(
&
mem
,
table
,
19
);
user
.
x509_issuer
=
get_field
(
&
mem
,
table
,
19
);
user
.
ssl_subject
=
get_field
(
&
mem
,
table
,
20
);
user
.
x509_subject
=
get_field
(
&
mem
,
table
,
20
);
}
#endif
#endif
if
(
user
.
password
&&
(
length
=
(
uint
)
strlen
(
user
.
password
))
==
8
&&
if
(
user
.
password
&&
(
length
=
(
uint
)
strlen
(
user
.
password
))
==
8
&&
protocol_version
==
PROTOCOL_VERSION
)
protocol_version
==
PROTOCOL_VERSION
)
...
@@ -2424,22 +2427,22 @@ int mysql_show_grants(THD *thd,LEX_USER *lex_user)
...
@@ -2424,22 +2427,22 @@ int mysql_show_grants(THD *thd,LEX_USER *lex_user)
/* SSL grant stuff */
/* SSL grant stuff */
DBUG_PRINT
(
"info"
,(
"acl_user->ssl_type=%s"
,
acl_user
->
ssl_type
));
DBUG_PRINT
(
"info"
,(
"acl_user->ssl_type=%s"
,
acl_user
->
ssl_type
));
DBUG_PRINT
(
"info"
,(
"acl_user->ssl_cipher=%s"
,
acl_user
->
ssl_cipher
));
DBUG_PRINT
(
"info"
,(
"acl_user->ssl_cipher=%s"
,
acl_user
->
ssl_cipher
));
DBUG_PRINT
(
"info"
,(
"acl_user->ssl_subject=%s"
,
acl_user
->
ssl
_subject
));
DBUG_PRINT
(
"info"
,(
"acl_user->x509_subject=%s"
,
acl_user
->
x509
_subject
));
DBUG_PRINT
(
"info"
,(
"acl_user->ssl_issuer=%s"
,
acl_user
->
ssl
_issuer
));
DBUG_PRINT
(
"info"
,(
"acl_user->x509_issuer=%s"
,
acl_user
->
x509
_issuer
));
if
(
acl_user
->
ssl_type
)
{
if
(
acl_user
->
ssl_type
)
{
if
(
!
strcmp
(
acl_user
->
ssl_type
,
"ssl"
))
if
(
!
strcmp
(
acl_user
->
ssl_type
,
"ssl"
))
global
.
append
(
" REQUIRE SSL"
,
12
);
global
.
append
(
" REQUIRE SSL"
,
12
);
else
if
(
!
strcmp
(
acl_user
->
ssl_type
,
"x509"
))
else
if
(
!
strcmp
(
acl_user
->
ssl_type
,
"x509"
))
{
{
global
.
append
(
" REQUIRE X509 "
,
14
);
global
.
append
(
" REQUIRE X509 "
,
14
);
if
(
acl_user
->
ssl
_issuer
)
{
if
(
acl_user
->
x509
_issuer
)
{
global
.
append
(
"SUBJECT
\"
"
,
9
);
global
.
append
(
"SUBJECT
\"
"
,
9
);
global
.
append
(
acl_user
->
ssl_issuer
,
strlen
(
acl_user
->
ssl
_issuer
));
global
.
append
(
acl_user
->
x509_issuer
,
strlen
(
acl_user
->
x509
_issuer
));
global
.
append
(
"
\"
"
,
1
);
global
.
append
(
"
\"
"
,
1
);
}
}
if
(
acl_user
->
ssl
_subject
)
{
if
(
acl_user
->
x509
_subject
)
{
global
.
append
(
"ISSUER
\"
"
,
8
);
global
.
append
(
"ISSUER
\"
"
,
8
);
global
.
append
(
acl_user
->
ssl_subject
,
strlen
(
acl_user
->
ssl
_subject
));
global
.
append
(
acl_user
->
x509_subject
,
strlen
(
acl_user
->
x509
_subject
));
global
.
append
(
"
\"
"
,
1
);
global
.
append
(
"
\"
"
,
1
);
}
}
}
}
...
...
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