Adding to this report to this MDEV as the error code is the same.
When using MariaDB 10.4.8 client (mysql Ver 15.1 Distrib 10.4.8-MariaDB, for Win64 (AMD64), source revision 4c2464b87d58a43d1292e166bae6720b51f4b000) to connect to MariaDB server (mysqld Ver 10.3.14-MariaDB-log for Linux on x86_64 (MariaDB Server) using SSL, the connection is failing with error message "ERROR 2026 (HY000): Unknown SSL error (0x80090308)".
Environment details:
Client: Windows 10 Version 1809 (IP:192.168.56.1)
Server: CentOS Linux release 7.6.1810 (Core) (IP:192.168.56.104)
The SSL certificate was generated from an intermediate CA as per guide OpenSSL Certificate Authority. I can provide all the commands used to generate CA if required. Below are the commands used on the CA to generate the database server certificate:
#!/bin/bash
|
|
DESTDIR="../ca"
|
DBHOSTNAME="srv01.dbservers.internal.local"
|
|
cd ${DESTDIR}
|
openssl genrsa \
|
-out intermediate/private/${DBHOSTNAME}.key.pem 2048
|
chmod 400 intermediate/private/${DBHOSTNAME}.key.pem
|
|
openssl req -config intermediate/openssl.cnf \
|
-key intermediate/private/${DBHOSTNAME}.key.pem \
|
-new -sha256 -out intermediate/csr/${DBHOSTNAME}.csr.pem
|
|
openssl ca -config intermediate/openssl.cnf \
|
-extensions server_cert -days 375 -notext -md sha256 \
|
-in intermediate/csr/${DBHOSTNAME}.csr.pem \
|
-out intermediate/certs/${DBHOSTNAME}.cert.pem
|
chmod 444 intermediate/certs/${DBHOSTNAME}.cert.pem
|
|
Certificate details:
[penzk001@mariabackup ssl]$ cd /etc/my.cnf.d/ssl
|
[penzk001@mariabackup ssl]$ openssl x509 -noout -text -in srv01.dbservers.internal.local.cert.pem
|
Certificate:
|
Data:
|
Version: 3 (0x2)
|
Serial Number: 4096 (0x1000)
|
Signature Algorithm: sha256WithRSAEncryption
|
Issuer: C=MT, ST=Malta, O=NA, OU=NA, CN=My intermediate CA
|
Validity
|
Not Before: Oct 27 07:51:26 2019 GMT
|
Not After : Nov 5 07:51:26 2020 GMT
|
Subject: C=MT, ST=Malta, L=Santa Venera, O=NA, OU=NA, CN=srv01.dbservers.internal.local
|
Subject Public Key Info:
|
Public Key Algorithm: rsaEncryption
|
Public-Key: (2048 bit)
|
Modulus:
|
00:ba:b9:2b:1f:1b:0f:88:92:b7:48:d3:50:83:c0:
|
...
|
93:25
|
Exponent: 65537 (0x10001)
|
X509v3 extensions:
|
X509v3 Basic Constraints:
|
CA:FALSE
|
Netscape Cert Type:
|
SSL Server
|
Netscape Comment:
|
OpenSSL Generated Server Certificate
|
X509v3 Subject Key Identifier:
|
17:1D:13:1D:05:94:77:50:97:F4:57:42:1B:FB:61:A3:F0:AF:65:E0
|
X509v3 Authority Key Identifier:
|
keyid:DF:7B:4F:C1:5C:8F:94:19:0D:B4:39:2A:1C:C1:0E:A6:F5:FD:A3:89
|
DirName:/C=MT/ST=Malta/L=Santa Venera/O=NA/OU=NA/CN=My root CA
|
serial:10:00
|
|
X509v3 Key Usage: critical
|
Digital Signature, Key Encipherment
|
X509v3 Extended Key Usage:
|
TLS Web Server Authentication
|
Signature Algorithm: sha256WithRSAEncryption
|
67:71:17:d1:0c:7d:21:85:47:d7:b1:8d:aa:d7:07:47:1e:25:
|
...
|
3e:c5:68:8c:ea:ea:dc:ca
|
[penzk001@mariabackup ssl]$
|
|
Server startup options:
mysqld would have been started with the following arguments:
|
--port=3306 --socket=/var/lib/mysql/mysql.sock --datadir=/var/lib/mysql --thread_stack=256K --sql_mode=STRICT_ALL_TABLES,ONLY_FULL_GROUP_BY --default_storage_engine=InnoDB --default_tmp_storage_engine=Aria --plugin-load=auth_pam.so --pam-use-cleartext-plugin=1 --ssl-ca=/etc/my.cnf.d/ssl/ca-chain.cert.pem --ssl-cert=/etc/my.cnf.d/ssl/srv01.dbservers.internal.local.cert.pem --ssl-key=/etc/my.cnf.d/ssl/srv01.dbservers.internal.local.key.pem --ssl_cipher=HIGH:+TLSv1.2 --key_buffer_size=16K --read_buffer_size=256K --read_rnd_buffer_size=256K --aria_pagecache_buffer_size=8M --table_open_cache=400 --sort_buffer_size=512K --myisam_sort_buffer_size=8388608 --query_cache_size=64M --query_cache_type=ON --innodb_buffer_pool_size=134217728 --innodb_strict_mode=1 --innodb_file_format=Barracuda --innodb_file_per_table=1 --innodb_flush_method=O_DIRECT --innodb_flush_log_at_trx_commit=1 --innodb_large_prefix=1 --innodb_autoinc_lock_mode=2 --innodb_log_group_home_dir=/var/lib/mysqlinnoredo --innodb_log_files_in_group=8 --innodb_log_file_size=78643200 --log_basename=mariadbsrv1 --log_bin=/var/lib/mysql-binlogs/mariadblog --max_binlog_size=10240000 --expire_logs_days=5 --binlog_format=ROW --tmpdir=/var/lib/mysql-tmp --innodb_buffer_pool_load_at_startup=ON --innodb_buffer_pool_dump_at_shutdown=ON --innodb_buffer_pool_filename=innodb_buffer_pool --max_allowed_packet=64M --net_buffer_length=8K --bind-address=0.0.0.0 --slow_query_log=1 --slow_query_log_file=mysql-slow.log --long_query_time=5 --log-queries-not-using-indexes=on --thread_handling=pool-of-threads --thread_pool_idle_timeout=60 --thread_pool_max_threads=1000 --thread_pool_size=8 --extra-port=3307 --extra-max-connections=500 --tmp_table_size=256M --max_heap_table_size=256M --innodb_undo_directory=/var/lib/mysqlundo --innodb_undo_logs=128 --innodb_undo_tablespaces=8 --slow_query_log=1 --slow_query_log_file=mysql-slow.log --long_query_time=5 --log-queries-not-using-indexes=on --lower_case_table_names=1 --server-id=1 --sync_binlog=1 --relay-log=mariadb-relay-bin --performance_schema=off --histogram_size=255 --histogram_type=SINGLE_PREC_HB --use_stat_tables=preferably --optimizer_use_condition_selectivity=4 --log_warnings=4 --log_error
|
[root@mariabackup my.cnf.d]#
|
|
MariaDB client connection attempt:
C:\temp\mariadb-10.4.8-winx64\bin>mysql --user=penzk001 --password --host=srv01.dbservers.internal.local --port=3306 --ssl-ca=c:\temp\ca-chain.cert.pem
|
Enter password: ********
|
ERROR 2026 (HY000): Unknown SSL error (0x80090308)
|
|
C:\temp\mariadb-10.4.8-winx64\bin>
|
In MariaDB server the following message is logged
2019-10-27 10:03:36 10 [Warning] Aborted connection 10 to db: 'unconnected' user: 'unauthenticated' host: '192.168.56.1' (CLOSE_CONNECTION)
|
Using wireshark on the database server, I have captured all the communication using filter (tcp port 3306), capture available in file (mariadbclt.pcapng)
MySQL client connection attempt:
C:\temp\mysql-8.0.18-winx64\bin>mysql --user=penzk001 --password --host=srv01.dbservers.internal.local --port=3306 --ssl-ca=c:\temp\ca-chain.cert.pem
|
Enter password: ********
|
Welcome to the MySQL monitor. Commands end with ; or \g.
|
...
|
mysql>
|
Using wireshark on the database server, I have captured all the communication using filter (tcp port 3306), capture available in file (mysqlclt.pcapng).
I have replicated the issue on a test environment, thus I can run additional tests if required.
Apparently it started here:
http://buildbot.askmonty.org/buildbot/builders/win32-debug/builds/4549