Debian Codegraph @

mysql-test/suite/auth_sec/r/openssl_cert_generation.result

raw
1 # Setup
2 call mtr.add_suppression("Failed to setup SSL");
3 call mtr.add_suppression("SSL error: SSL_CTX_set_default_verify_paths failed");
4 # Restart completed.
5 # Test 1 : System variable tests
6 # auto_generate_certs should be OFF.
7 select @@global.auto_generate_certs;
8 @@global.auto_generate_certs
9 0
10 # sha256_password_auto_generate_rsa_keys should be OFF.
11 select @@global.sha256_password_auto_generate_rsa_keys;
12 @@global.sha256_password_auto_generate_rsa_keys
13 0
14 set @@global.auto_generate_certs='OFF';
15 ERROR HY000: Variable 'auto_generate_certs' is a read only variable
16 set @@global.sha256_password_auto_generate_rsa_keys='OFF';
17 ERROR HY000: Variable 'sha256_password_auto_generate_rsa_keys' is a read only variable
18 # Test 2 : Restarting mysqld with :
19 # --auto_generate_certs=0
20 # --sha256_password_auto_generate_rsa_keys=0
21 # Restart completed.
22 # Search for : Skipping generation of SSL certificates as --auto_generate_certs is set to OFF.
23 Pattern "Skipping generation of SSL certificates as --auto_generate_certs is set to OFF" found
24 # Search completed.
25 # Search for : Skipping generation of RSA key pair as --sha256_password_auto_generate_rsa_keys is set to OFF.
26 Pattern "Skipping generation of RSA key pair as --sha256_password_auto_generate_rsa_keys is set to OFF" found
27 # Search completed.
28 # Ensure that certificate files are not there after server is started
29 # Ensure that server is not ssl enabled
30 # Ensure that sha connection is not possible in absence of certificates and keys
31 create user wl7699_sha256 identified with 'sha256_password' by 'abcd';
32 drop user wl7699_sha256;
33 # Test 3 : SSL certificates
34 # 3.1 : Restarting mysqld with : --auto-generate-certs=1
35 # Restart completed.
36 # Search for : Auto generated SSL certificates are placed in data directory.
37 Pattern "Auto generated SSL certificates are placed in data directory." found
38 # Search completed.
39 # Search for SSL certificate and key files in Data directory.
40 # Search completed.
41 # Ensure that RSA files are not there in data directory
42 # Ensure that server is ssl enabled
43 Variable_name Value
44 Ssl_cipher SSL_CIPHER
45 # Test 4 : RSA key pair
46 # 4.1 : Restarting mysqld with :
47 # --sha256_password_auto_generate_rsa_keys=1
48 # Restart completed.
49 # Search for : Auto generated RSA key files through --sha256_password_auto_generate_rsa_keys are placed in data directory.
50 Pattern "Auto generated RSA key files through --sha256_password_auto_generate_rsa_keys are placed in data directory." found
51 # Search completed.
52 # Search for RSA key files in Data directory.
53 # Search completed.
54 # Ensure that server is not ssl enabled
55 # Test 5 : Skipping SSL Certificates/Key File Generation
56 # 5.1 : Restarting mysqld with :
57 # --auto_generate_certs=ON
58 # --sha256_password_auto_generate_rsa_keys=ON
59 # Restart completed.
60 # Generation of SSL ceritificates/key files and
61 # RSA key pair files is skipped.
62 # Search for : Messages related to skipped generation of SSL certificates and RSA key pair files.
63 Pattern "Skipping generation of SSL certificates as certificate files are present in data directory" found
64 Pattern "Skipping generation of RSA key pair" found
65 # Search completed.
66 # 5.2 : System variables
67 # auto_generate_certs, ssl_ca, ssl_cert and ssl_key should be set.
68 SELECT VARIABLE_NAME,VARIABLE_VALUE FROM performance_schema.global_variables
69 WHERE VARIABLE_NAME IN ('auto_generate_certs', 'ssl_ca', 'ssl_cert', 'ssl_key') ORDER BY 1;
70 VARIABLE_NAME VARIABLE_VALUE
71 auto_generate_certs ON
72 ssl_ca ca.pem
73 ssl_cert server-cert.pem
74 ssl_key server-key.pem
75 # sha256_password_auto_generate_rsa_keys, sha256_password_private_key_path
76 # and sha256_password_public_key_path should be set.
77 SELECT VARIABLE_NAME,VARIABLE_VALUE FROM performance_schema.global_variables
78 WHERE VARIABLE_NAME LIKE 'sha256%' ORDER BY 1;
79 VARIABLE_NAME VARIABLE_VALUE
80 sha256_password_auto_generate_rsa_keys ON
81 sha256_password_private_key_path private_key.pem
82 sha256_password_proxy_users OFF
83 sha256_password_public_key_path public_key.pem
84 # 5.3 : SHA256_password user
85 create user wl7699_sha256 identified with 'sha256_password' by 'abcd';
86 # Should be able to connect to server using generated SSL certificates.
87 Variable_name Value
88 Ssl_cipher SSL_CIPHER
89 # Should be able to connect to server using RSA key pair.
90 current_user()
91 wl7699_sha256@%
92 drop user wl7699_sha256;
93 # Test 6 : SSL Certificates/Key File Generation and tests
94 # 6.1 : Restarting mysqld with :
95 # --auto_generate_certs=ON
96 # --sha256_password_auto_generate_rsa_keys=ON
97 # Restart completed.
98 # Search for : Auto generated SSL certificates are placed in data directory.
99 Pattern "Auto generated SSL certificates are placed in data directory." found
100 # Search completed.
101 # Search for : Auto generated RSA key files through --sha256_password_auto_generate_rsa_keys are placed in data directory.
102 Pattern "Auto generated RSA key files through --sha256_password_auto_generate_rsa_keys are placed in data directory." found
103 # Search completed.
104 # 6.2 : System variables
105 # auto_generate_certs, ssl_ca, ssl_cert and ssl_key should be set.
106 SELECT VARIABLE_NAME,VARIABLE_VALUE FROM performance_schema.global_variables
107 WHERE VARIABLE_NAME IN ('auto_generate_certs', 'ssl_ca', 'ssl_cert', 'ssl_key') ORDER BY 1;
108 VARIABLE_NAME VARIABLE_VALUE
109 auto_generate_certs ON
110 ssl_ca ca.pem
111 ssl_cert server-cert.pem
112 ssl_key server-key.pem
113 # sha256_password_auto_generate_rsa_keys, sha256_password_private_key_path
114 # and sha256_password_public_key_path should be set.
115 SELECT VARIABLE_NAME,VARIABLE_VALUE FROM performance_schema.global_variables
116 WHERE VARIABLE_NAME LIKE 'sha256%' ORDER BY 1;
117 VARIABLE_NAME VARIABLE_VALUE
118 sha256_password_auto_generate_rsa_keys ON
119 sha256_password_private_key_path private_key.pem
120 sha256_password_proxy_users OFF
121 sha256_password_public_key_path public_key.pem
122 # 6.3 : SSL connection
123 # Should be able to connect to server using generated SSL certificates.
124 Variable_name Value
125 Ssl_cipher SSL_CIPHER
126 # 6.4 : SHA256_password user
127 create user wl7699_sha256 identified with 'sha256_password' by 'abcd';
128 # Should be able to connect to server using generated SSL certificates.
129 Variable_name Value
130 Ssl_cipher SSL_CIPHER
131 # Should be able to connect to server using RSA key pair.
132 current_user()
133 wl7699_sha256@%
134 drop user wl7699_sha256;
135 # Test 7 : SSL Certificates/Key File Generation and tests
136 # 7.1 : Restarting mysqld with :
137 # --skip-ssl
138 # --auto_generate_certs=ON
139 # --sha256_password_auto_generate_rsa_keys=ON
140 # Restart completed.
141 # Search for : Auto generated RSA key files through --sha256_password_auto_generate_rsa_keys are placed in data directory.
142 Pattern "Auto generated RSA key files through --sha256_password_auto_generate_rsa_keys are placed in data directory." found
143 # Search completed.
144 # 7.2 : System variables
145 # No ssl variables should be set
146 SELECT VARIABLE_NAME,VARIABLE_VALUE FROM performance_schema.global_variables
147 WHERE VARIABLE_NAME IN ('auto_generate_certs', 'ssl_ca', 'ssl_cert', 'ssl_key') ORDER BY 1;
148 VARIABLE_NAME VARIABLE_VALUE
149 auto_generate_certs ON
150 ssl_ca
151 ssl_cert
152 ssl_key
153 # sha256_password_auto_generate_rsa_keys, sha256_password_private_key_path
154 # and sha256_password_public_key_path should be set.
155 SELECT VARIABLE_NAME,VARIABLE_VALUE FROM performance_schema.global_variables
156 WHERE VARIABLE_NAME LIKE 'sha256%' ORDER BY 1;
157 VARIABLE_NAME VARIABLE_VALUE
158 sha256_password_auto_generate_rsa_keys ON
159 sha256_password_private_key_path private_key.pem
160 sha256_password_proxy_users OFF
161 sha256_password_public_key_path public_key.pem
162 # 7.3 : SSL connection
163 # Should not be able to connect to server using generated SSL certificates.
164 # 7.4 : SHA256_password user
165 create user wl7699_sha256 identified with 'sha256_password' by 'abcd';
166 # Should not be able to connect to server using generated SSL certificates.
167 # Should be able to connect to server using RSA key pair.
168 current_user()
169 wl7699_sha256@%
170 drop user wl7699_sha256;
171 #
172 # Bug#21108296 : --SSL-CIPHER OPTION CAUSES SSL INITIALIZATION FAILURE
173 #
174 # Restarting mysqld with :
175 # --auto_generate_certs=ON
176 # --ssl-cipher=ECDHE-RSA-AES128-GCM-SHA256
177 # --skip-sha256_password_auto_generate_rsa_keys
178 # Restart completed.
179 # Search for : Auto generated SSL certificates are placed in data directory.
180 Pattern "Auto generated SSL certificates are placed in data directory." found
181 # Search completed.
182 Variable_name Value
183 Ssl_cipher ECDHE-RSA-AES128-GCM-SHA256
184 # Clean-up
185 # restart: