add MYSQL_SSL_* to the driver for MySQL connections #19

Manually merged
TDE merged 1 commits from tqt3-mysql-ssl into master 5 years ago
denis commented 5 years ago
Collaborator

added:
MYSQL_SSL_KEY, MYSQL_SSL_CERT, MYSQL_SSL_CA, MYSQL_SSL_CAPATH options
to manage MySQL/MariaDB connections

Signed-off-by: Denis Kozadaev denis@dilos.org

added: MYSQL_SSL_KEY, MYSQL_SSL_CERT, MYSQL_SSL_CA, MYSQL_SSL_CAPATH options to manage MySQL/MariaDB connections Signed-off-by: Denis Kozadaev <denis@dilos.org>
MicheleC reviewed 5 years ago
MicheleC left a comment
Owner

Overall it looks good. Just need to polish up the points pointed out in the individual comments

Overall it looks good. Just need to polish up the points pointed out in the individual comments
if (clientOptionFlags & CLIENT_SSL) {
mysql_ssl_set(d->mysql,
ssl_key.isNull()? static_cast<const char *>(0):ssl_key.latin1(),
Owner

It is better to use isEmpty() instead of isNull() since it can catch the case where a string is == "" rather than null.

It is better to use isEmpty() instead of isNull() since it can catch the case where a string is == "" rather than null.
denis commented 5 years ago
Poster
Collaborator

accepted, I will change it to isEmpty()

accepted, I will change it to isEmpty()
if (clientOptionFlags & CLIENT_SSL) {
mysql_ssl_set(d->mysql,
ssl_key.isNull()? static_cast<const char *>(0):ssl_key.latin1(),
ssl_cert.isNull()? static_cast<const char *>(0):ssl_cert.latin1(),
Owner

Is there a specific reason for using latin1()?

I have been discussing this with Slavek and we think local8Bit() is a better option since most likely those fields refer to local files (private key, public key and so on).

Is there a specific reason for using latin1()?<br> I have been discussing this with Slavek and we think local8Bit() is a better option since most likely those fields refer to local files (private key, public key and so on).
denis commented 5 years ago
Poster
Collaborator

modern file systems use utf8, are you sure about local8Bit()?
maybe utf8() or ascii()

modern file systems use utf8, are you sure about local8Bit()? maybe utf8() or ascii()
Owner

local8Bit() is the correct choice because the result matches locales == if the user uses utf8, then the result local8Bit() will be the same as utf8(), if it uses a different character set, the result will match the locales character set.

`local8Bit()` is the correct choice because the result matches locales == if the user uses utf8, then the result `local8Bit()` will be the same as `utf8()`, if it uses a different character set, the result will match the locales character set.
Owner

@denis you'll need to get a little bit of practice in using git 😉

I cleaned up the commits in your pull-request again to be one clean commit where you're listed as the author.

@denis you'll need to get a little bit of practice in using git :wink: I cleaned up the commits in your pull-request again to be one clean commit where you're listed as the author.
SlavekB closed this pull request 5 years ago
TDE closed this pull request 5 years ago
SlavekB deleted branch tqt3-mysql-ssl 5 years ago
SlavekB added this to the R14.0.7 release milestone 5 years ago
The pull request has been manually merged as 4f528c3bd2.
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: TDE/tqt3#19
Loading…
There is no content yet.