Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

MySQL SSL settings do not always require the sslkey option

#253

Using the MySQL SSL settings in database.yml is conditional on there being an 'sslkey' option set. While this is sometimes the case, it's not always necessary. In many cases the only required option to set is the 'sslca' (certificate authority) file. This file is always required, even when the 'sslkey' option is also set.

Taken straight from the MySQL docs at: http://dev.mysql.com/doc/refman/...

If the account has no special SSL requirements or was created using a GRANT statement that includes the REQUIRE SSL option, a client can connect securely by using just the --ssl-ca option:

The patch just changes the conditional to check if 'sslca' is set instead of looking for 'sslkey'.

I have tested this on my local setup using only the sslca option. The connection worked fine and was being encrypted correctly (ie. I could see the SSL cipher when running the command 'SHOW STATUS LIKE 'Ssl_cipher';')

I apologize if the git patch is not correctly formatted. This is my first experience with git.

Reported by Micah Wedemeyer · May 25th, 2008 @ 09:58 PM

State: resolved
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. Pratik
    Pratik
    • Title changed from [PATCH] MySQL SSL settings do not always require the sslkey option to MySQL SSL settings do not always require the sslkey option

    May 25th, 2008 @ 10:38 PM

  2. Micah Wedemeyer
    Micah Wedemeyer

    I forgot to update the comments to add the sslca option. It's actually been in the code for a while, but never made it into the comments.

    Attaching a patch with the updated comments.

    May 25th, 2008 @ 11:00 PM

  3. Repository
    Repository
    • State changed from new to resolved
    • Tag set to activerecord, patch, ssl

    (from [5e2e1ed9ffc481a91596d8c3fd9a68d7977e75ca]) Ensure MysqlAdapter allows SSL connection when only sslca is supplied. [#253 state:resolved]

    Signed-off-by: Pratik Naik

    http://github.com/rails/rails/co...

    July 12th, 2008 @ 03:01 AM