[MDEV-13706] MariaDB compiled with Openssl is not compatiable with old mysql yaSSL client Created: 2017-09-01 Updated: 2017-09-06 Resolved: 2017-09-06 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | SSL |
| Affects Version/s: | 10.2.8 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | jianwei zhao | Assignee: | Sergei Golubchik |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Linux 2.6.23 |
||
| Attachments: |
|
| Description |
|
Hi, pretty guys. I want to improve our product environment security level, then I compiled MariaDB10.2.8 with openSSL1.0.1e. but when I use old yaSSL client connection server, it failed. But the openSSL compiled client is ok.
when I used MariaDB10.2.8 openSSL compiled client to connect server, it successed:
But when I used MySQL 5.6 , before client or yaSSL compiled mariaDB client to connect server, it all failed:
so, does it mean that MariaDB server compiled with openSSL is not compatible with old yaSSL client? |
| Comments |
| Comment by Sergei Golubchik [ 2017-09-01 ] | ||||||||||||||||||||||||||||||||||||||||||
|
It might be If you use MySQL with YaSSL or MariaDB before 10.2.6, bug | ||||||||||||||||||||||||||||||||||||||||||
| Comment by jianwei zhao [ 2017-09-02 ] | ||||||||||||||||||||||||||||||||||||||||||
|
Hi, as you suggested, I have tried newest mariaDB 10.2.8 & 10.3, confirm that the code have fixed when I use mariaDB compiled openSSL client, connect can success:
when I used old client compiled yaSSL, still error:
I have found that there is a workaround:
If I used all ssl-ca, ss-cert, ssl-key both server and client. then all the old client can connect to MariaDB compiled openSSL. Is it really a bug or some mistake? | ||||||||||||||||||||||||||||||||||||||||||
| Comment by jianwei zhao [ 2017-09-02 ] | ||||||||||||||||||||||||||||||||||||||||||
|
I have doubted that if the openSSL required X509 defaultly, even though 'CREATE USER......' didn't require | ||||||||||||||||||||||||||||||||||||||||||
| Comment by jianwei zhao [ 2017-09-02 ] | ||||||||||||||||||||||||||||||||||||||||||
|
Hi, I debuged the MariaDB compiled openSSL 1.0.1e: [my.cnf]
The MariaDB server error stack as below:
It seems that it required cert and failed, but I didn't require X509 when create user. | ||||||||||||||||||||||||||||||||||||||||||
| Comment by jianwei zhao [ 2017-09-02 ] | ||||||||||||||||||||||||||||||||||||||||||
|
Sergei, is that you? Thank you for your reply. This problem I have encountered also existed on MySQL 5.7.18. | ||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2017-09-04 ] | ||||||||||||||||||||||||||||||||||||||||||
|
Yes, that's me, hi I cannot repeat this issue. I tried MariaDB 10.0 client compiled with yassl and MariaDB 10.2 server compiled with OpenSSL 1.0.1e-fips. But it connected just fine and ssl was used. Do you have fips enabled in your setup? | ||||||||||||||||||||||||||||||||||||||||||
| Comment by jianwei zhao [ 2017-09-04 ] | ||||||||||||||||||||||||||||||||||||||||||
|
Hi, Sergei I have tried MariaDB again, as you said,
the yaSSL compile MariaDB 10.0 client can connect openSSL compiled MariaDB server 10.3. Since I can't control the customer's client library on AliBABA Cloud RDS MySQL. I have checked the MySQL official GIT log, found that:
Maybe it is the reason, community yaSSL client can't connect enterprise openSSL server. But But,,, It left me so embarrassed, If I want to upgrade TLSv1.2, I have no chance to upgrade my customer's client library, since we have more than ten thousands customers. Tears...... | ||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2017-09-05 ] | ||||||||||||||||||||||||||||||||||||||||||
|
I see, thanks. In 5.5 it was commit 634bb833796c7cd46b88cb81be55d4635a3aea67, released with MySQL-5.5.37. So any reasonably recent MySQL or MariaDB, 5.5.37 or later should have this bug fixed. As a workaround, I don't know if you have some kind of central configuration for all clients, but if you can ensure that they always specify all the three parameters — ssl-ca, or ssl-cert or ssl-key — then it should work too, the commit comment says the bug happens when some parameters are not specified. | ||||||||||||||||||||||||||||||||||||||||||
| Comment by jianwei zhao [ 2017-09-05 ] | ||||||||||||||||||||||||||||||||||||||||||
|
Unfortunately we only supply CA.pem to client and set ssl-cert and ssl-key configuration on server on AliBABA I have to cover the yaSSL bug unwillingly. so I patch it as below:
I really didn't want that, but I have no choice. Thanks again, caused some trouble to you. hope you have a good time. | ||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2017-09-06 ] | ||||||||||||||||||||||||||||||||||||||||||
|
Yes, I plan to. Thank you! |