@@ -626,10 +626,10 @@ def testChain(path):
626
626
# Test that a chain with an untrusted CA is not valid
627
627
self .assertTrue (len (QgsAuthCertUtils .validateCertChain (QgsAuthCertUtils .certsFromFile (path ))) > 0 )
628
628
629
- # Test that a chain with an untrusted CA is valid when the addRootCa argumentis true
629
+ # Test that a chain with an untrusted CA is valid when the addRootCa argument is true
630
630
self .assertTrue (len (QgsAuthCertUtils .validateCertChain (QgsAuthCertUtils .certsFromFile (path ), None , True )) == 0 )
631
631
632
- # Test that a chain with an untrusted CA is not valid when the addRootCa argumentis true
632
+ # Test that a chain with an untrusted CA is not valid when the addRootCa argument is true
633
633
# and a wrong domainis true
634
634
self .assertTrue (len (QgsAuthCertUtils .validateCertChain (QgsAuthCertUtils .certsFromFile (path ), 'my.wrong.domain' , True )) > 0 )
635
635
@@ -638,18 +638,20 @@ def testChain(path):
638
638
639
639
path = PKIDATA + '/localhost_ssl_w-chain.pem'
640
640
641
- # Test that a chain with an untrusted CA is not valid when the addRootCa argumentis true
641
+ # Test that a chain with an untrusted CA is not valid when the addRootCa argument is true
642
642
# and a wrong domain is set
643
643
self .assertTrue (len (QgsAuthCertUtils .validateCertChain (QgsAuthCertUtils .certsFromFile (path ), 'my.wrong.domain' , True )) > 0 )
644
644
645
- # Test that a chain with an untrusted CA is valid when the addRootCa argumentis true
645
+ # Test that a chain with an untrusted CA is valid when the addRootCa argument is true
646
646
# and a right domain is set
647
647
self .assertTrue (len (QgsAuthCertUtils .validateCertChain (QgsAuthCertUtils .certsFromFile (path ), 'localhost' , True )) == 0 )
648
648
649
649
# Test that a chain with an untrusted CA is not valid when the addRootCa argument is false
650
650
# and a right domain is set
651
651
self .assertTrue (len (QgsAuthCertUtils .validateCertChain (QgsAuthCertUtils .certsFromFile (path ), 'localhost' , False )) > 0 )
652
652
653
+ testChain (PKIDATA + '/fra_w-chain.pem' )
654
+
653
655
654
656
if __name__ == '__main__' :
655
657
unittest .main ()
0 commit comments