Type:
Task
Priority:
Major
Resolution:
Fixed
I generated certificates according to the instructions in the KnowledgeBase:
https://mariadb.com/kb/en/certificate-creation-with-openssl/
I created a ca-cert, a server and a client certificate
and set up the server using:
[mysqld]
bind-address=0.0.0.0
ssl
ssl-ca=/etc/mysql/ssl/ca-cert.pem
ssl-cert=/etc/mysql/ssl/server-cert.pem
ssl-key=/etc/mysql/ssl/server-key.pem
In the following snippets 192.168.23.15 is my linux server, 192.168.23.66 a Windows10 machine. The database user name I use is "secure".
I can connect from linux clients using the client certificate just fine, e.g.:
mysql -h 192.168.23.15 -p -u secure --ssl-ca=ssl/ca-cert.pem --ssl-key=ssl/client-key.pem --ssl-cert=ssl/client-cert.pem
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
...
and I can verify that encryption is indeed used:
Trying to connect from the Windows machine I can't connect though:
mysql -u secure -p -h 192.168.23.15 --ssl-ca=\ssl\ca-cert.pem --ssl-key=\ssl\client-key.pem --ssl-cert=\ssl\client-cert.pem
Enter password: ******
ERROR 2026 (HY000): SSL connection error: no cipher match. Error 0x80090331(SEC_E_ALGORITHM_MISMATCH)
I CAN connect from windows to linux using encryption when just giving the --ssl option without explicit client certificate:
~ > mysql -h 192.168.23.66 -p -u secure --ssl
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 7
Server version: 10.5.10-MariaDB mariadb.org binary distribution
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
(none) 10.5.10-MariaDB
> show status like 'ssl_version';
+---------------+---------+
| Variable_name | Value |
+---------------+---------+
| Ssl_version | TLSv1.2 |
+---------------+---------+
1 row in set (0.006 sec)
(none) 10.5.10-MariaDB
> show status like 'ssl_cipher';
+---------------+--------------------+
| Variable_name | Value |
+---------------+--------------------+
| Ssl_cipher | DHE-RSA-AES256-SHA |
+---------------+--------------------+
1 row in set (0.016 sec)
When setting up MariaDB server on the windows size with the same server certificate as on Linux, and trying to connect locally using the client certificate I'm getting:
C:\Program Files\MariaDB 10.5\data>mysql -h 192.168.23.66 -u secure -p --ssl --ssl-ca=\ssl\ca-cert.pem --ssl-key=\ssl\client-key.pem --ssl-cert=\ssl\client-cert.pem
Enter password: ******
ERROR 2026 (HY000): SSL connection error: An unknown error occurred while processing the certificate. Error 0x80090327(SEC_E_CERT_UNKNOWN)
And when trying to connect to that windows server from linux (only server IP changed from .15 to .66 after verifying that things work locally):
~ > mysql -h 192.168.23.66 -p -u secure --ssl-ca=/etc/mysql/ssl/ca-cert.pem --ssl-key=/etc/mysql/ssl/client-key.pem --ssl-cert=/etc/mysql/ssl/client-cert.pem --Enter password:
ERROR 2026 (HY000): SSL connection error: sslv3 alert bad certificate
Again, when just using the --ssl option without explicit client certificate the connection is established using TLS v1.2 just fine.
Also when using MySQL 5.7 on the windows side, which uses OpenSSL instead of WolfSSL, things work just fine both ways with explicit client certificate.
So there seems to be some problem with WolfSSL and certificate verification, at least when the certificates were created using OpenSSL as described in our knowledge base.
{"report":{"fcp":1041.6999998092651,"ttfb":253.90000009536743,"pageVisibility":"visible","entityId":99717,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"61b63ab0-07bb-41f3-8add-78e400494ddc","navigationType":0,"readyForUser":1106,"redirectCount":0,"resourceLoadedEnd":1173.0999999046326,"resourceLoadedStart":260,"resourceTiming":[{"duration":144.59999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":260,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":260,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":404.59999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":146.7999997138977,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":260.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":260.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":407.09999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":154.30000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":260.5,"connectEnd":260.5,"connectStart":260.5,"domainLookupEnd":260.5,"domainLookupStart":260.5,"fetchStart":260.5,"redirectEnd":0,"redirectStart":0,"requestStart":260.5,"responseEnd":414.80000019073486,"responseStart":414.80000019073486,"secureConnectionStart":260.5},{"duration":254.7000002861023,"initiatorType":"script","name":"https://jira.mariadb.org/s/c32eb0da7ad9831253f8397e6cc26afd-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":260.59999990463257,"connectEnd":260.59999990463257,"connectStart":260.59999990463257,"domainLookupEnd":260.59999990463257,"domainLookupStart":260.59999990463257,"fetchStart":260.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":260.59999990463257,"responseEnd":515.3000001907349,"responseStart":515.3000001907349,"secureConnectionStart":260.59999990463257},{"duration":258.19999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/bc0bcb146314416123c992714ee00ff7-CDN/lu2bv2/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":260.80000019073486,"connectEnd":260.80000019073486,"connectStart":260.80000019073486,"domainLookupEnd":260.80000019073486,"domainLookupStart":260.80000019073486,"fetchStart":260.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":260.80000019073486,"responseEnd":519,"responseStart":519,"secureConnectionStart":260.80000019073486},{"duration":258.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":261.09999990463257,"connectEnd":261.09999990463257,"connectStart":261.09999990463257,"domainLookupEnd":261.09999990463257,"domainLookupStart":261.09999990463257,"fetchStart":261.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":261.09999990463257,"responseEnd":519.5999999046326,"responseStart":519.5999999046326,"secureConnectionStart":261.09999990463257},{"duration":258.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":261.19999980926514,"connectEnd":261.19999980926514,"connectStart":261.19999980926514,"domainLookupEnd":261.19999980926514,"domainLookupStart":261.19999980926514,"fetchStart":261.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":261.19999980926514,"responseEnd":520,"responseStart":520,"secureConnectionStart":261.19999980926514},{"duration":304.19999980926514,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bv2/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":261.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":261.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":565.5999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":258.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":261.59999990463257,"connectEnd":261.59999990463257,"connectStart":261.59999990463257,"domainLookupEnd":261.59999990463257,"domainLookupStart":261.59999990463257,"fetchStart":261.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":261.59999990463257,"responseEnd":520.5,"responseStart":520.5,"secureConnectionStart":261.59999990463257},{"duration":304.2000002861023,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bv2/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":261.69999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":261.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":565.9000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":260,"initiatorType":"script","name":"https://jira.mariadb.org/s/719848dd97ebe0663199f49a3936487a-CDN/lu2bv2/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":261.80000019073486,"connectEnd":261.80000019073486,"connectStart":261.80000019073486,"domainLookupEnd":261.80000019073486,"domainLookupStart":261.80000019073486,"fetchStart":261.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":261.80000019073486,"responseEnd":521.8000001907349,"responseStart":521.8000001907349,"secureConnectionStart":261.80000019073486},{"duration":463.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":263,"connectEnd":263,"connectStart":263,"domainLookupEnd":263,"domainLookupStart":263,"fetchStart":263,"redirectEnd":0,"redirectStart":0,"requestStart":263,"responseEnd":726.9000000953674,"responseStart":726.9000000953674,"secureConnectionStart":263},{"duration":857.9000000953674,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":263,"connectEnd":263,"connectStart":263,"domainLookupEnd":263,"domainLookupStart":263,"fetchStart":263,"redirectEnd":0,"redirectStart":0,"requestStart":263,"responseEnd":1120.9000000953674,"responseStart":1120.9000000953674,"secureConnectionStart":263},{"duration":148.89999961853027,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":578.3000001907349,"connectEnd":578.3000001907349,"connectStart":578.3000001907349,"domainLookupEnd":578.3000001907349,"domainLookupStart":578.3000001907349,"fetchStart":578.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":578.3000001907349,"responseEnd":727.1999998092651,"responseStart":727.1999998092651,"secureConnectionStart":578.3000001907349},{"duration":302.7999997138977,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bv2/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":870.3000001907349,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":870.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1173.0999999046326,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":56,"responseStart":254,"responseEnd":257,"domLoading":257,"domInteractive":1176,"domContentLoadedEventStart":1176,"domContentLoadedEventEnd":1222,"domComplete":2739,"loadEventStart":2739,"loadEventEnd":2741,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1160},{"name":"bigPipe.sidebar-id.end","time":1160.9000000953674},{"name":"bigPipe.activity-panel-pipe-id.start","time":1161.0999999046326},{"name":"bigPipe.activity-panel-pipe-id.end","time":1163.6999998092651},{"name":"activityTabFullyLoaded","time":1228}],"measures":[],"correlationId":"66071c8d345756","effectiveType":"4g","downlink":9.2,"rtt":0,"serverDuration":105,"dbReadsTimeInMs":14,"dbConnsTimeInMs":24,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}