You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.5 KiB

  1. #
  2. # MDEV-6975 Implement TLS protocol
  3. #
  4. # test SSLv3 and TLSv1.2 ciphers when OpenSSL is restricted to SSLv3 or TLSv1.2
  5. #
  6. source include/have_ssl_communication.inc;
  7. # this is OpenSSL test.
  8. grant select on test.* to ssl_sslv3@localhost require cipher "RC4-SHA";
  9. grant select on test.* to ssl_tls12@localhost require cipher "AES128-SHA256";
  10. let $mysql=$MYSQL --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem -e "SHOW STATUS LIKE 'ssl_Cipher'" 2>&1;
  11. disable_abort_on_error;
  12. echo TLS1.2 ciphers: user is ok with any cipher;
  13. exec $mysql --ssl-cipher=AES128-SHA256;
  14. exec $mysql --ssl-cipher=TLSv1.2;
  15. echo TLS1.2 ciphers: user requires SSLv3 cipher RC4-SHA;
  16. exec $mysql --user ssl_sslv3 --ssl-cipher=AES128-SHA256;
  17. exec $mysql --user ssl_sslv3 --ssl-cipher=TLSv1.2;
  18. echo TLS1.2 ciphers: user requires TLSv1.2 cipher AES128-SHA256;
  19. exec $mysql --user ssl_tls12 --ssl-cipher=AES128-SHA256;
  20. exec $mysql --user ssl_tls12 --ssl-cipher=TLSv1.2;
  21. echo SSLv3 ciphers: user is ok with any cipher;
  22. exec $mysql --ssl-cipher=RC4-SHA;
  23. exec $mysql --ssl-cipher=SSLv3;
  24. echo SSLv3 ciphers: user requires SSLv3 cipher RC4-SHA;
  25. exec $mysql --user ssl_sslv3 --ssl-cipher=RC4-SHA;
  26. exec $mysql --user ssl_sslv3 --ssl-cipher=SSLv3;
  27. echo SSLv3 ciphers: user requires TLSv1.2 cipher AES128-SHA256;
  28. exec $mysql --user ssl_tls12 --ssl-cipher=RC4-SHA;
  29. exec $mysql --user ssl_tls12 --ssl-cipher=SSLv3;
  30. drop user ssl_sslv3@localhost;
  31. drop user ssl_tls12@localhost;