[CONC-527] Connect error "SEC_E_ALGORITHM_MISMATCH" from Windows to Ubuntu server Created: 2021-02-18 Updated: 2023-03-12 Resolved: 2021-09-27 |
|
| Status: | Closed |
| Project: | MariaDB Connector/C |
| Component/s: | TLS/SSL |
| Affects Version/s: | 3.1.11 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Critical |
| Reporter: | Martin Baxter | Assignee: | Vladislav Vaintroub |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | connection, error, tls | ||
| Environment: |
Client is Windows 10, Server is MariaDB 10.5.8 on Ubuntu 20.04 |
||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Description |
|
The MariaDB connector on Windows seems unable to connect to a MariaDB server running on Ubuntu. Although the error (coming from MS Secure Channel) suggests a cipher mismatch, inspection of the ciphers supported on both sides shows 14 ciphers in common, one of which was selected by the server in the Server Hello. The MySQL connector/C connects fine from Windows to the same MariaDB. Inspection of the packets using Wireshark did not show an obvious problem. The Client Hello and Server Hello seemed ok (to a non-TLS expert). Stepping through the MariaDB Connector code on the Windows side also didn't show any obvious problem. I've reached the limits of the debugging that I can do in this context. Are there other errors which MS will put into the "SEC_E_ALGORITHM_MISMATCH" return code? Are there any other known problems with MariaDB Connector/C on Windows? Any other ideas? Wireshark files and (example self-signed) certificates are available. To replicate: (2) On Windows, use the command This should give the error Apologies if there is anything wrong with these settings, but I feel I have tried as many permutations as I can think of. Thanks. |
| Comments |
| Comment by Georg Richter [ 2021-02-20 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
Question about 10.5.8 server: Which tls library and version does the server use (show variables like 'version_ssl_library' will give you this information)? | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marco Paland [ 2021-03-23 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
I don't want to hijack this issue, but I have a very similar problem, except that I get: SSL connection error: An unknown error occurred while processing the certificate. Error 0x80090327(SEC_E_CERT_UNKNOWN) I'm trying to SSL connect to a 10.5.9 mariadb binary package on debian buster, which is using WolfSSL 4.6.0 internally. My client is Windows 10 and I tested it with the native mariadb c connector 3.1.11 and did another test with the latest HeidiSQL client - same error. Generation of the used certs was done on the db server and is pretty basic. openssl verify -CAfile ca-cert.pem server-cert.pem client-cert.pem Do you have any advice, cause connecting via SSL is really mandatory for the app. | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Georg Richter [ 2021-03-24 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
Marco, this is different. If you think this is a bug, please file a new issue. | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Vladislav Vaintroub [ 2021-06-01 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
Note, that the error does not happen if one just tries to use SSL without the client certificate. It seems like there is something in the client certificate that server requires, and (according to schannel) client does not have. Also since there were no complaints about other Ubuntu versions, I'd expect something is off with openssl configuration on 20.04. | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Vladislav Vaintroub [ 2021-09-25 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
Please note also, that according to pcap file, the server sends CertificateRequest which includes 20 signature hash algorithms, but none of them matches SHA256 RSA,which is what client certificate has.
The server only accepts SHA224 RSA, of all "sha rsa" signature algorithms family, but not SHA256 RSA. | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Vladislav Vaintroub [ 2021-09-27 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
There appears to be some kind of bug in openssl. According to google, Ubuntu made the decision to compile with non-default settings for openssl, to make it appear more secure. The workaround Now, for all people who deal with that problem Ubuntu 20.04, this is one workaround
There are some variations on CipherString workaround, a popular discussion in https://askubuntu.com/questions/1233186/ubuntu-20-04-how-to-set-lower-ssl-security-level. This has something with the client certificate, and how it was created, but I frankly have no idea what that exactly can be. |