@@ -85,11 +85,11 @@ func TestAuthFastCachingSHA256PasswordCached(t *testing.T) {
85
85
plugin := "caching_sha2_password"
86
86
87
87
// Send Client Authentication Packet
88
- authResp , addNUL , err := mc .auth (authData , plugin )
88
+ authResp , err := mc .auth (authData , plugin )
89
89
if err != nil {
90
90
t .Fatal (err )
91
91
}
92
- err = mc .writeHandshakeResponsePacket (authResp , addNUL , plugin )
92
+ err = mc .writeHandshakeResponsePacket (authResp , plugin )
93
93
if err != nil {
94
94
t .Fatal (err )
95
95
}
@@ -130,11 +130,11 @@ func TestAuthFastCachingSHA256PasswordEmpty(t *testing.T) {
130
130
plugin := "caching_sha2_password"
131
131
132
132
// Send Client Authentication Packet
133
- authResp , addNUL , err := mc .auth (authData , plugin )
133
+ authResp , err := mc .auth (authData , plugin )
134
134
if err != nil {
135
135
t .Fatal (err )
136
136
}
137
- err = mc .writeHandshakeResponsePacket (authResp , addNUL , plugin )
137
+ err = mc .writeHandshakeResponsePacket (authResp , plugin )
138
138
if err != nil {
139
139
t .Fatal (err )
140
140
}
@@ -172,11 +172,11 @@ func TestAuthFastCachingSHA256PasswordFullRSA(t *testing.T) {
172
172
plugin := "caching_sha2_password"
173
173
174
174
// Send Client Authentication Packet
175
- authResp , addNUL , err := mc .auth (authData , plugin )
175
+ authResp , err := mc .auth (authData , plugin )
176
176
if err != nil {
177
177
t .Fatal (err )
178
178
}
179
- err = mc .writeHandshakeResponsePacket (authResp , addNUL , plugin )
179
+ err = mc .writeHandshakeResponsePacket (authResp , plugin )
180
180
if err != nil {
181
181
t .Fatal (err )
182
182
}
@@ -228,11 +228,11 @@ func TestAuthFastCachingSHA256PasswordFullRSAWithKey(t *testing.T) {
228
228
plugin := "caching_sha2_password"
229
229
230
230
// Send Client Authentication Packet
231
- authResp , addNUL , err := mc .auth (authData , plugin )
231
+ authResp , err := mc .auth (authData , plugin )
232
232
if err != nil {
233
233
t .Fatal (err )
234
234
}
235
- err = mc .writeHandshakeResponsePacket (authResp , addNUL , plugin )
235
+ err = mc .writeHandshakeResponsePacket (authResp , plugin )
236
236
if err != nil {
237
237
t .Fatal (err )
238
238
}
@@ -280,11 +280,11 @@ func TestAuthFastCachingSHA256PasswordFullSecure(t *testing.T) {
280
280
plugin := "caching_sha2_password"
281
281
282
282
// Send Client Authentication Packet
283
- authResp , addNUL , err := mc .auth (authData , plugin )
283
+ authResp , err := mc .auth (authData , plugin )
284
284
if err != nil {
285
285
t .Fatal (err )
286
286
}
287
- err = mc .writeHandshakeResponsePacket (authResp , addNUL , plugin )
287
+ err = mc .writeHandshakeResponsePacket (authResp , plugin )
288
288
if err != nil {
289
289
t .Fatal (err )
290
290
}
@@ -336,7 +336,7 @@ func TestAuthFastCleartextPasswordNotAllowed(t *testing.T) {
336
336
plugin := "mysql_clear_password"
337
337
338
338
// Send Client Authentication Packet
339
- _ , _ , err := mc .auth (authData , plugin )
339
+ _ , err := mc .auth (authData , plugin )
340
340
if err != ErrCleartextPassword {
341
341
t .Errorf ("expected ErrCleartextPassword, got %v" , err )
342
342
}
@@ -353,11 +353,11 @@ func TestAuthFastCleartextPassword(t *testing.T) {
353
353
plugin := "mysql_clear_password"
354
354
355
355
// Send Client Authentication Packet
356
- authResp , addNUL , err := mc .auth (authData , plugin )
356
+ authResp , err := mc .auth (authData , plugin )
357
357
if err != nil {
358
358
t .Fatal (err )
359
359
}
360
- err = mc .writeHandshakeResponsePacket (authResp , addNUL , plugin )
360
+ err = mc .writeHandshakeResponsePacket (authResp , plugin )
361
361
if err != nil {
362
362
t .Fatal (err )
363
363
}
@@ -396,11 +396,11 @@ func TestAuthFastCleartextPasswordEmpty(t *testing.T) {
396
396
plugin := "mysql_clear_password"
397
397
398
398
// Send Client Authentication Packet
399
- authResp , addNUL , err := mc .auth (authData , plugin )
399
+ authResp , err := mc .auth (authData , plugin )
400
400
if err != nil {
401
401
t .Fatal (err )
402
402
}
403
- err = mc .writeHandshakeResponsePacket (authResp , addNUL , plugin )
403
+ err = mc .writeHandshakeResponsePacket (authResp , plugin )
404
404
if err != nil {
405
405
t .Fatal (err )
406
406
}
@@ -439,7 +439,7 @@ func TestAuthFastNativePasswordNotAllowed(t *testing.T) {
439
439
plugin := "mysql_native_password"
440
440
441
441
// Send Client Authentication Packet
442
- _ , _ , err := mc .auth (authData , plugin )
442
+ _ , err := mc .auth (authData , plugin )
443
443
if err != ErrNativePassword {
444
444
t .Errorf ("expected ErrNativePassword, got %v" , err )
445
445
}
@@ -455,11 +455,11 @@ func TestAuthFastNativePassword(t *testing.T) {
455
455
plugin := "mysql_native_password"
456
456
457
457
// Send Client Authentication Packet
458
- authResp , addNUL , err := mc .auth (authData , plugin )
458
+ authResp , err := mc .auth (authData , plugin )
459
459
if err != nil {
460
460
t .Fatal (err )
461
461
}
462
- err = mc .writeHandshakeResponsePacket (authResp , addNUL , plugin )
462
+ err = mc .writeHandshakeResponsePacket (authResp , plugin )
463
463
if err != nil {
464
464
t .Fatal (err )
465
465
}
@@ -498,11 +498,11 @@ func TestAuthFastNativePasswordEmpty(t *testing.T) {
498
498
plugin := "mysql_native_password"
499
499
500
500
// Send Client Authentication Packet
501
- authResp , addNUL , err := mc .auth (authData , plugin )
501
+ authResp , err := mc .auth (authData , plugin )
502
502
if err != nil {
503
503
t .Fatal (err )
504
504
}
505
- err = mc .writeHandshakeResponsePacket (authResp , addNUL , plugin )
505
+ err = mc .writeHandshakeResponsePacket (authResp , plugin )
506
506
if err != nil {
507
507
t .Fatal (err )
508
508
}
@@ -540,11 +540,11 @@ func TestAuthFastSHA256PasswordEmpty(t *testing.T) {
540
540
plugin := "sha256_password"
541
541
542
542
// Send Client Authentication Packet
543
- authResp , addNUL , err := mc .auth (authData , plugin )
543
+ authResp , err := mc .auth (authData , plugin )
544
544
if err != nil {
545
545
t .Fatal (err )
546
546
}
547
- err = mc .writeHandshakeResponsePacket (authResp , addNUL , plugin )
547
+ err = mc .writeHandshakeResponsePacket (authResp , plugin )
548
548
if err != nil {
549
549
t .Fatal (err )
550
550
}
@@ -587,11 +587,11 @@ func TestAuthFastSHA256PasswordRSA(t *testing.T) {
587
587
plugin := "sha256_password"
588
588
589
589
// Send Client Authentication Packet
590
- authResp , addNUL , err := mc .auth (authData , plugin )
590
+ authResp , err := mc .auth (authData , plugin )
591
591
if err != nil {
592
592
t .Fatal (err )
593
593
}
594
- err = mc .writeHandshakeResponsePacket (authResp , addNUL , plugin )
594
+ err = mc .writeHandshakeResponsePacket (authResp , plugin )
595
595
if err != nil {
596
596
t .Fatal (err )
597
597
}
@@ -636,11 +636,11 @@ func TestAuthFastSHA256PasswordRSAWithKey(t *testing.T) {
636
636
plugin := "sha256_password"
637
637
638
638
// Send Client Authentication Packet
639
- authResp , addNUL , err := mc .auth (authData , plugin )
639
+ authResp , err := mc .auth (authData , plugin )
640
640
if err != nil {
641
641
t .Fatal (err )
642
642
}
643
- err = mc .writeHandshakeResponsePacket (authResp , addNUL , plugin )
643
+ err = mc .writeHandshakeResponsePacket (authResp , plugin )
644
644
if err != nil {
645
645
t .Fatal (err )
646
646
}
@@ -669,15 +669,15 @@ func TestAuthFastSHA256PasswordSecure(t *testing.T) {
669
669
plugin := "sha256_password"
670
670
671
671
// send Client Authentication Packet
672
- authResp , addNUL , err := mc .auth (authData , plugin )
672
+ authResp , err := mc .auth (authData , plugin )
673
673
if err != nil {
674
674
t .Fatal (err )
675
675
}
676
676
677
677
// unset TLS config to prevent the actual establishment of a TLS wrapper
678
678
mc .cfg .tls = nil
679
679
680
- err = mc .writeHandshakeResponsePacket (authResp , addNUL , plugin )
680
+ err = mc .writeHandshakeResponsePacket (authResp , plugin )
681
681
if err != nil {
682
682
t .Fatal (err )
683
683
}
0 commit comments