@@ -135,89 +135,6 @@ describe('ssl', function () {
135
135
await conn . end ( ) ;
136
136
} ) ;
137
137
138
- it ( 'self signed certificate server before ephemeral' , async function ( ) {
139
- if ( isMaxscale ( ) ) this . skip ( ) ;
140
- if ( ! sslEnable ) this . skip ( ) ;
141
-
142
- // test will work either because server certificate chain is trusted (not don in tests)
143
- // or using mariadb ephemeral certificate validation
144
- if (
145
- ! shareConn . info . isMariaDB ( ) ||
146
- ( shareConn . info . hasMinVersion ( 11 , 4 , 0 ) && ! shareConn . info . hasMinVersion ( 23 , 0 , 0 ) )
147
- )
148
- this . skip ( ) ;
149
- try {
150
- await base . createConnection ( { ssl : true , port : sslPort } ) ;
151
- throw new Error ( 'must have thrown error' ) ;
152
- } catch ( e ) {
153
- assert . equal ( e . errno , errors . ER_SELF_SIGNED ) ;
154
- }
155
- } ) ;
156
-
157
- it ( 'self signed certificate forcing no password' , async function ( ) {
158
- if ( isMaxscale ( ) ) this . skip ( ) ;
159
- if ( ! sslEnable ) this . skip ( ) ;
160
-
161
- // test will work either because server certificate chain is trusted (not done in tests)
162
- // or using mariadb ephemeral certificate validation
163
- if ( shareConn . info . isMariaDB ( ) && shareConn . info . hasMinVersion ( 11 , 4 , 0 ) && ! shareConn . info . hasMinVersion ( 23 , 0 , 0 ) )
164
- this . skip ( ) ;
165
- if ( Conf . baseConfig . password ) this . skip ( ) ;
166
- try {
167
- await base . createConnection ( { ssl : true , port : sslPort } ) ;
168
- throw new Error ( 'must have thrown error' ) ;
169
- } catch ( e ) {
170
- assert . equal ( e . errno , errors . ER_SELF_SIGNED ) ;
171
- }
172
- } ) ;
173
-
174
- it ( 'self signed certificate forcing with password ssl:true' , async function ( ) {
175
- if ( isMaxscale ( ) ) this . skip ( ) ;
176
- if ( ! sslEnable ) this . skip ( ) ;
177
-
178
- // test will work either because server certificate chain is trusted (not don in tests)
179
- // or using mariadb ephemeral certificate validation
180
- if (
181
- ! shareConn . info . isMariaDB ( ) ||
182
- ! shareConn . info . hasMinVersion ( 11 , 4 , 0 ) ||
183
- shareConn . info . hasMinVersion ( 23 , 0 , 0 )
184
- )
185
- this . skip ( ) ;
186
- if ( ! Conf . baseConfig . password ) this . skip ( ) ;
187
- const conn = await base . createConnection ( {
188
- user : 'sslTestUser' ,
189
- password : 'ytoKS@led5' ,
190
- ssl : true ,
191
- port : sslPort
192
- } ) ;
193
- await validConnection ( conn ) ;
194
- await conn . end ( ) ;
195
- } ) ;
196
-
197
- it ( 'self signed certificate forcing with password ssl: {rejectUnauthorized: true}' , async function ( ) {
198
- if ( isMaxscale ( ) ) this . skip ( ) ;
199
- if ( ! sslEnable ) this . skip ( ) ;
200
-
201
- // test will work either because server certificate chain is trusted (not done in tests)
202
- // or using mariadb ephemeral certificate validation
203
- if (
204
- ! shareConn . info . isMariaDB ( ) ||
205
- ! shareConn . info . hasMinVersion ( 11 , 4 , 0 ) ||
206
- shareConn . info . hasMinVersion ( 23 , 0 , 0 )
207
- )
208
- this . skip ( ) ;
209
- if ( ! Conf . baseConfig . password ) this . skip ( ) ;
210
-
211
- const conn = await base . createConnection ( {
212
- user : 'sslTestUser' ,
213
- password : 'ytoKS@led5' ,
214
- ssl : { rejectUnauthorized : true } ,
215
- port : sslPort
216
- } ) ;
217
- await validConnection ( conn ) ;
218
- await conn . end ( ) ;
219
- } ) ;
220
-
221
138
it ( 'ensure connection use SSL ' , async function ( ) {
222
139
if ( isMaxscale ( ) ) this . skip ( ) ;
223
140
if ( ! sslEnable ) this . skip ( ) ;
@@ -232,19 +149,6 @@ describe('ssl', function () {
232
149
conn . end ( ) ;
233
150
} ) ;
234
151
235
- it ( 'ensure connection use NOT SSL ' , async function ( ) {
236
- if ( isMaxscale ( ) ) this . skip ( ) ;
237
- if ( ! sslEnable ) this . skip ( ) ;
238
- if ( ! base . utf8Collation ( ) ) this . skip ( ) ;
239
- const conn = await base . createConnection ( {
240
- user : 'nosslTestUser' ,
241
- password : 'ytoKS@led5' ,
242
- allowPublicKeyRetrieval : true
243
- } ) ;
244
- await validConnection ( conn ) ;
245
- conn . end ( ) ;
246
- } ) ;
247
-
248
152
it ( 'SSLv3 disable' , async function ( ) {
249
153
if ( ! sslEnable ) this . skip ( ) ;
250
154
try {
@@ -580,37 +484,6 @@ describe('ssl', function () {
580
484
conn . query ( 'DROP USER ChangeUser' + getHostSuffix ( ) ) ;
581
485
conn . end ( ) ;
582
486
} ) ;
583
-
584
- it ( 'ssl dialog authentication plugin' , async function ( ) {
585
- if ( ! process . env . TEST_PAM_USER ) this . skip ( ) ;
586
- if ( isMaxscale ( ) ) this . skip ( ) ;
587
- if ( ! shareConn . info . isMariaDB ( ) ) this . skip ( ) ;
588
- if ( ! sslEnable ) this . skip ( ) ;
589
-
590
- this . timeout ( 10000 ) ;
591
- try {
592
- await shareConn . query ( "INSTALL PLUGIN pam SONAME 'auth_pam'" ) ;
593
- } catch ( error ) { }
594
- try {
595
- await shareConn . query ( "DROP USER IF EXISTS '" + process . env . TEST_PAM_USER + "'" + getHostSuffix ( ) ) ;
596
- } catch ( error ) { }
597
-
598
- await shareConn . query (
599
- "CREATE USER '" + process . env . TEST_PAM_USER + "'" + getHostSuffix ( ) + " IDENTIFIED VIA pam USING 'mariadb'"
600
- ) ;
601
- await shareConn . query (
602
- "GRANT SELECT ON *.* TO '" + process . env . TEST_PAM_USER + "'" + getHostSuffix ( ) + ' IDENTIFIED VIA pam'
603
- ) ;
604
- await shareConn . query ( 'FLUSH PRIVILEGES' ) ;
605
-
606
- const conn = await base . createConnection ( {
607
- user : process . env . TEST_PAM_USER ,
608
- password : process . env . TEST_PAM_PWD ,
609
- ssl : { rejectUnauthorized : false } ,
610
- port : sslPort
611
- } ) ;
612
- await conn . end ( ) ;
613
- } ) ;
614
487
} ) ;
615
488
616
489
function checkProtocol ( conn , protocol ) {
0 commit comments