| 1 |
source include/not_embedded.inc; |
| 2 |
source include/not_windows.inc; |
| 3 |
if (`select @@version_ssl_library not like 'OpenSSL%'`) { |
| 4 |
skip Needs OpenSSL; |
| 5 |
} |
| 6 |
|
| 7 |
|
| 8 |
--echo # |
| 9 |
--echo # MDEV-35368 Validation of SSL certificate fails for mariadb-backup |
| 10 |
--echo # |
| 11 |
GRANT ALL PRIVILEGES on *.* TO backup_user IDENTIFIED by 'x' REQUIRE SSL; |
| 12 |
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup; |
| 13 |
|
| 14 |
let SSL_CERT_DIR=$MYSQL_TMP_DIR; |
| 15 |
copy_file $MYSQL_TEST_DIR/std_data/cacert.pem $MYSQL_TMP_DIR/ed1f42db.0; |
| 16 |
|
| 17 |
echo # localhost, not self-signed cert with a wrong hostname: ok; |
| 18 |
exec $XTRABACKUP --user=root --socket=$MASTER_MYSOCK --backup --target-dir=$targetdir; |
| 19 |
rmdir $targetdir; |
| 20 |
|
| 21 |
echo # tcp, not self-signed cert with a wrong hostname: fails; |
| 22 |
error 1; |
| 23 |
exec $XTRABACKUP --no-defaults --protocol=tcp --user=root --port=$MASTER_MYPORT --backup --target-dir=$targetdir; |
| 24 |
|
| 25 |
echo # tcp, not self-signed cert with a wrong hostname: fails even with a password (no auto-verification); |
| 26 |
error 1; |
| 27 |
exec $XTRABACKUP --no-defaults --protocol=tcp --user=backup_user --password=x --port=$MASTER_MYPORT --backup --target-dir=$targetdir; |
| 28 |
|
| 29 |
remove_file $MYSQL_TMP_DIR/ed1f42db.0; |
| 30 |
DROP USER backup_user; |