[CONC-50] Oracle and MariaDB API's differ in behaviour when establishing an SSL connection for a user with "REQURE SSL" Created: 2013-09-16  Updated: 2013-09-17  Resolved: 2013-09-16

Status: Closed
Project: MariaDB Connector/C
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Sudhindra Bhat Assignee: Georg Richter
Resolution: Fixed Votes: 0
Labels: None
Environment:

Windows build , MariaDB client library revision 84.



 Description   

mysql_ssl_set(mysql, NULL,NULL,NULL, NULL, NULL);
or
mysql_ssl_set(mysql, NULL,NULL,"some_invalid_value", NULL, NULL);
followed by,
mysql_real_connect(mysql, host, user, passwd, db, port, unix_socket, clientflag);

The above mentioned code successfully establishes MySql connection for a user with "REQUIRE SSL" using MariaDB API where as Oracle API returns error 2026 if the ca field is NULL or if the ca-certificate is invalid as mentioned in the code above.

I have found the following bug report in MySql bug database:
http://bugs.mysql.com/bug.php?id=62743

Could you clarify the discussion that followed in the above bug report,if it is a bug or not?
And Hence is the current behaviour of the client library correct?



 Comments   
Comment by Georg Richter [ 2013-09-16 ]

Fixed in rev. 85

Comment by Sudhindra Bhat [ 2013-09-17 ]

The issue is not completely fixed.

mysql_ssl_set(MYSQL *mysql, const char *key, const char *cert, const char *ca, const char *capath, const char *cipher)

1. For the parameter "ca" , even if we pass server-certificate or the client-certificate, the connection will be successful where as Oracle API returns an error if we do not pass a valid ca-certificate.
2. If we pass an empty string to the parameters "key" and "cert" the connection is successful where as Oracle API returns an error if either of key or cert was an empty string.
3. If we provide wrong path for "key" or "cert" connection will fail and return error 2026 but with ambiguous error message.It either returns "SSL connection error: No such file or directory" or "SSL connection error: system lib"

Generated at Thu Feb 08 03:02:31 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.