Bug #34935 mysql_get_ssl_cipher returns an empty string
Submitted: 28 Feb 2008 16:50 Modified: 24 Apr 2008 23:20
Reporter: Santo Leto Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: C API (client library) Severity:S3 (Non-critical)
Version:5.1.23-rc OS:Windows (XP SP2)
Assigned to: CPU Architecture:Any
Tags: C API, mysql_get_ssl_cipher, SSL

[28 Feb 2008 16:50] Santo Leto
Description:
I find the following possible bug when calling mysql_get_ssl_cipher: the function returns an empty string.

How to repeat:
1) Set up a MySQL Server with SSL support
2) Connect to the server and make sure the variable have_ssl = yes

mysql> show variables like 'have_ssl';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| have_ssl      | YES   |
+---------------+-------+
1 row in set (0.00 sec)

3) create a SSL user
4) connect to the server and ensure your connection is using ssl

\s

....
Current user:           ssl2@localhost
SSL:                    Cipher in use is DHE-RSA-AES256-SHA
....

5) create a program and connect to the server using the API (make sure your API version is higher than 5.1.11)

mysql_ssl_set
mysql_real_connect

6) call mysql_get_ssl_cipher (I expect that the function returns DHE-RSA-AES256-SHA but I get an empty string).
[28 Feb 2008 19:22] Sveta Smirnova
Thank you for the report.

Could you please provide test case? We need SHOW GRANTS FOR ssl2@localhost and part of your C program with mysql_ssl_set, mysql_real_connect and mysql_get_ssl_cipher calls
[29 Feb 2008 10:20] MySQL Verification Team
Thank you for the feedback. Please provide the complete C test case. Thanks
in advance.
[24 Mar 2008 23:20] Sveta Smirnova
Santo,

thank you for the feedback. But I see no reason why not to provide repeatable test case. We don't need your full application, but just <50 lines code which we can compile. If you meet prolem with third-party application (which can be only reason not to provide repeatable test case for this problem) please open bug report to its vendor as I was not able to repeat described behavior with self-written program.
[25 Apr 2008 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".