@@ -326,20 +326,6 @@ def testANON(self):
326
326
self .t2 .bind (self .c2 )
327
327
_testSaslMech (self , 'ANONYMOUS' , authUser = 'anonymous' )
328
328
329
- def testCRAMMD5 (self ):
330
- common .ensureCanTestExtendedSASL ()
331
-
332
- self .t1 .bind (self .c1 )
333
- self .t2 .bind (self .c2 )
334
- _testSaslMech (self , 'CRAM-MD5' )
335
-
336
- def testDIGESTMD5 (self ):
337
- common .ensureCanTestExtendedSASL ()
338
-
339
- self .t1 .bind (self .c1 )
340
- self .t2 .bind (self .c2 )
341
- _testSaslMech (self , 'DIGEST-MD5' )
342
-
343
329
# PLAIN shouldn't work without encryption without special setting
344
330
def testPLAINfail (self ):
345
331
common .ensureCanTestExtendedSASL ()
@@ -367,15 +353,12 @@ def testPLAIN(self):
367
353
self .t2 .bind (self .c2 )
368
354
_testSaslMech (self , 'PLAIN' )
369
355
370
- # SCRAM not supported before Cyrus SASL 2.1.26
371
- # so not universal and hence need a test for support
372
- # to keep it in tests.
373
- # def testSCRAMSHA1(self):
374
- # common.ensureCanTestExtendedSASL()
375
- #
376
- # self.t1.bind(self.c1)
377
- # self.t2.bind(self.c2)
378
- # _testSaslMech(self, 'SCRAM-SHA-1')
356
+ def testSCRAMSHA1 (self ):
357
+ common .ensureCanTestExtendedSASL ()
358
+
359
+ self .t1 .bind (self .c1 )
360
+ self .t2 .bind (self .c2 )
361
+ _testSaslMech (self , 'SCRAM-SHA-1' )
379
362
380
363
381
364
def _sslConnection (domain , transport , connection ):
@@ -550,7 +533,7 @@ def testNormalAuthenticationClient(self):
550
533
self .c1 .collect (self .collector )
551
534
self .t1 .bind (self .c1 )
552
535
self .t2 .bind (self .c2 )
553
- _testSaslMech (self , 'DIGEST-MD5 ' )
536
+ _testSaslMech (self , 'SCRAM-SHA-1 ' )
554
537
self .expect (Event .CONNECTION_INIT , Event .CONNECTION_BOUND ,
555
538
Event .CONNECTION_LOCAL_OPEN , Event .TRANSPORT ,
556
539
Event .CONNECTION_REMOTE_OPEN )
@@ -560,7 +543,7 @@ def testNormalAuthenticationServer(self):
560
543
self .c2 .collect (self .collector )
561
544
self .t1 .bind (self .c1 )
562
545
self .t2 .bind (self .c2 )
563
- _testSaslMech (self , 'DIGEST-MD5 ' )
546
+ _testSaslMech (self , 'SCRAM-SHA-1 ' )
564
547
self .expect (Event .CONNECTION_INIT , Event .CONNECTION_BOUND ,
565
548
Event .CONNECTION_LOCAL_OPEN , Event .TRANSPORT ,
566
549
Event .CONNECTION_REMOTE_OPEN )
@@ -572,7 +555,7 @@ def testFailedAuthenticationClient(self):
572
555
self .c1 .collect (self .collector )
573
556
self .t1 .bind (self .c1 )
574
557
self .t2 .bind (self .c2 )
575
- _testSaslMech (self , 'DIGEST-MD5 ' , clientUser = clientUser , authenticated = False )
558
+ _testSaslMech (self , 'SCRAM-SHA-1 ' , clientUser = clientUser , authenticated = False )
576
559
self .expect (Event .CONNECTION_INIT , Event .CONNECTION_BOUND ,
577
560
Event .CONNECTION_LOCAL_OPEN , Event .TRANSPORT ,
578
561
Event .TRANSPORT_ERROR ,
@@ -586,7 +569,7 @@ def testFailedAuthenticationServer(self):
586
569
self .c2 .collect (self .collector )
587
570
self .t1 .bind (self .c1 )
588
571
self .t2 .bind (self .c2 )
589
- _testSaslMech (self , 'DIGEST-MD5 ' , clientUser = clientUser , authenticated = False )
572
+ _testSaslMech (self , 'SCRAM-SHA-1 ' , clientUser = clientUser , authenticated = False )
590
573
self .expect (Event .CONNECTION_INIT , Event .CONNECTION_BOUND ,
591
574
Event .CONNECTION_LOCAL_OPEN , Event .TRANSPORT ,
592
575
Event .TRANSPORT_ERROR ,
@@ -599,7 +582,7 @@ def testNoMechClient(self):
599
582
self .s2 .allowed_mechs ('IMPOSSIBLE' )
600
583
self .t1 .bind (self .c1 )
601
584
self .t2 .bind (self .c2 )
602
- _testSaslMech (self , 'DIGEST-MD5 ' , authenticated = False )
585
+ _testSaslMech (self , 'SCRAM-SHA-1 ' , authenticated = False )
603
586
self .expect (Event .CONNECTION_INIT , Event .CONNECTION_BOUND ,
604
587
Event .CONNECTION_LOCAL_OPEN , Event .TRANSPORT ,
605
588
Event .TRANSPORT_ERROR ,
@@ -611,7 +594,7 @@ def testNoMechServer(self):
611
594
self .s2 .allowed_mechs ('IMPOSSIBLE' )
612
595
self .t1 .bind (self .c1 )
613
596
self .t2 .bind (self .c2 )
614
- _testSaslMech (self , 'DIGEST-MD5 ' , authenticated = False )
597
+ _testSaslMech (self , 'SCRAM-SHA-1 ' , authenticated = False )
615
598
self .expect (Event .CONNECTION_INIT , Event .CONNECTION_BOUND ,
616
599
Event .CONNECTION_LOCAL_OPEN , Event .TRANSPORT ,
617
600
Event .TRANSPORT_TAIL_CLOSED ,
0 commit comments