[CONC-500] MariaDB does not support intermediate chained SSL certificates Created: 2020-09-04 Updated: 2021-04-19 Resolved: 2020-09-14 |
|
| Status: | Closed |
| Project: | MariaDB Connector/C |
| Component/s: | None |
| Affects Version/s: | 3.1.9 |
| Fix Version/s: | 3.1.10 |
| Type: | Bug | Priority: | Major |
| Reporter: | Daniel Almeida (Inactive) | Assignee: | Georg Richter |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
We were not able to configure ssl while attempting to configure MariaDB to use intermediate ssl certificates.
What appears to be happening is that the MySQL client isn't using the vio implementation, it is using the libmariadb implementation in libmariadb/libmariadb/secure/openssl.c The code for libmariadb/libmariadb/secure/openssl.c has the following sequence, which seem to prevent intermediate certs to work:
The viosslfactories.c implemetation has the following code instead: 
The call to SSL_use_certificate_file appears to be incorrect, as it appears to blow away any work of SSL_CTX_use_certificate_chain_file. In the interim, we were able to make it work by bundling them on the server, just not by bundling them on the client. This however defeats the purpose of this solution and it is 100% the opposite of best practices for TLS certificate deployments. This isn't what you're supposed to do. |
| Comments |
| Comment by Sergei Golubchik [ 2020-09-04 ] |
|
Where do chained certificates fail to work — on the client or on the server? |
| Comment by Zephaniah Loss-Cutler-Hull [ 2020-09-04 ] |
|
On the client. The server is correctly serving certificate chains to the client, but the client is failing to send the intermediate certificate to the server. |