| 1 |
--source include/have_fips.inc |
| 2 |
|
| 3 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 4 |
SET GLOBAL ssl_fips_mode=0; |
| 5 |
SELECT @@GLOBAL.ssl_fips_mode; |
| 6 |
|
| 7 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 8 |
SET GLOBAL ssl_fips_mode=1; |
| 9 |
SELECT @@GLOBAL.ssl_fips_mode; |
| 10 |
|
| 11 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 12 |
SET GLOBAL ssl_fips_mode=2; |
| 13 |
SELECT @@GLOBAL.ssl_fips_mode; |
| 14 |
|
| 15 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 16 |
SET GLOBAL ssl_fips_mode=off; |
| 17 |
SELECT @@GLOBAL.ssl_fips_mode; |
| 18 |
|
| 19 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 20 |
SET GLOBAL ssl_fips_mode=on; |
| 21 |
SELECT @@GLOBAL.ssl_fips_mode; |
| 22 |
|
| 23 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 24 |
SET GLOBAL ssl_fips_mode=strict; |
| 25 |
SELECT @@GLOBAL.ssl_fips_mode; |
| 26 |
|
| 27 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 28 |
SET GLOBAL ssl_fips_mode='oFf'; |
| 29 |
SELECT @@GLOBAL.ssl_fips_mode; |
| 30 |
|
| 31 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 32 |
SET GLOBAL ssl_fips_mode='oN'; |
| 33 |
SELECT @@GLOBAL.ssl_fips_mode; |
| 34 |
|
| 35 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 36 |
SET GLOBAL ssl_fips_mode='Strict'; |
| 37 |
SELECT @@GLOBAL.ssl_fips_mode; |
| 38 |
|
| 39 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 40 |
SET GLOBAL ssl_fips_mode=''; |
| 41 |
|
| 42 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 43 |
SET GLOBAL ssl_fips_mode=3; |
| 44 |
|
| 45 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 46 |
SET GLOBAL ssl_fips_mode=-1; |
| 47 |
|
| 48 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 49 |
SET SESSION ssl_fips_mode=1; |
| 50 |
|
| 51 |
CREATE USER u1 IDENTIFIED BY 'pwd'; |
| 52 |
|
| 53 |
--echo ##Test: User without admin/super privilege |
| 54 |
connect(con1,localhost,u1,pwd,test,,,); |
| 55 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 56 |
SET GLOBAL ssl_fips_mode=ON; |
| 57 |
|
| 58 |
connection default; |
| 59 |
|
| 60 |
--echo ##Test: User with admin privilege |
| 61 |
GRANT SYSTEM_VARIABLES_ADMIN ON *.* TO u1; |
| 62 |
disconnect con1; |
| 63 |
connect(con1,localhost,u1,pwd,test,,,); |
| 64 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 65 |
SET GLOBAL ssl_fips_mode=ON; |
| 66 |
connection default; |
| 67 |
REVOKE SYSTEM_VARIABLES_ADMIN ON *.* FROM u1; |
| 68 |
|
| 69 |
--echo ##Test: User with SUPER privilege |
| 70 |
GRANT SUPER ON *.* TO u1; |
| 71 |
disconnect con1; |
| 72 |
connect(con1,localhost,u1,pwd,test,,,); |
| 73 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 74 |
SET GLOBAL ssl_fips_mode=ON; |
| 75 |
|
| 76 |
--echo CLEANUP |
| 77 |
disconnect con1; |
| 78 |
connection default; |
| 79 |
DROP USER u1; |
| 80 |
|