 |
MySQLTalk.org MYSQL discussions groups
|
| View previous topic :: View next topic |
| Author |
Message |
Edward Diener Guest
|
Posted: Wed Dec 17, 2008 6:16 pm Post subject: SSL between client and server using SslOption/mysql_ssl_set |
|
|
I have a few questions about the parameters for SslOption/mysql_ssl_set
( C++/C ) and about SSL in general between the server and the client.
I do understand what a certificate, a private key, and a public key is
in general but I am having trouble understandng how they work in MySql.
1) Are the first three parameters just the file name portions of the
full file specifications for the private key, public key, and
certificate respectively ? The documentation suggets that they can be
file paths, but then the fourth parameter would seem redundant.
2) Is the fourth parameter the file path for all of the first three file
names ? If this is so and the path is the current directory, can this be
0 ?
3) What determines a valid cipher name, and where is that specified in
MySql SSL in general ? Is there a way to say that all ciphers are valid
with this parameter ?
When SSL goes between the client and the server, using the same
certificate authority certificate, is there one set of public-private
keys where the server's private key is the client's public key and the
server's public key is the client's private key ? Or are there actually
two distinct sets of public-private keys, one each for the client and
the server ? The former seems logically correct but maybe I am missing
something about how this works in SSL. If someone can explain this to me
it would be appreciated. The MySql manual does not explain it.
In general the documentation for MySql SSL in section 5.5.7 of the MySql
manual is pretty abysmal, which makes me think that either no one ever
uses SSL in MySql, MySql is an inadequate database for SSL, or that no
one cares to actually explain how SSL works under MySql.
I am hoping that someone know how this works from the programming point
of view and can explain it adequately to me or actually point me to
documentation/examples which does explain it. |
|
| Back to top |
|
 |
Cantwell, Bryan Guest
|
Posted: Wed Dec 17, 2008 6:17 pm Post subject: Function call reult in a WHERE-IN clause |
|
|
I have a function that I built that returns a string that is really a
comma separated list of values (below). I would like to use that
returned value in an IN clause in sql. :
select * from hosts where hostid in (getHosts(1001000000004));
The function:
CREATE FUNCTION getUserHosts(userID BIGINT(20) UNSIGNED)
RETURNS varchar(4096) CHARSET latin1
BEGIN
DECLARE hosts VARCHAR (4096);
SELECT
GROUP_CONCAT(DISTINCT h.hostid)
INTO
hosts
FROM
hosts h LEFT JOIN hosts_groups hg ON hg.hostid = h.hostid
LEFT JOIN groups g ON g.groupid = hg.groupid
LEFT JOIN rights r ON r.id = g.groupid AND r.type = 1
LEFT JOIN users_groups ug ON ug.usrgrpid = r.groupid
LEFT JOIN nodes n ON getNodeFromID(h.hostid) = n.nodeid
WHERE
ug.userid = userID
AND r.permission = 3
AND h.status <> 4
ORDER BY
h.hostid;
RETURN hosts;
END |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|