Exemple #1
0
 def test_missingCertificate(self):
     success, _ignore_reason = verifyTLSCertificate(
         ConfigDict({
             "SSLCertificate": "missing",
             "SSLKeychainIdentity": "missing",
         }))
     self.assertFalse(success)
Exemple #2
0
 def test_emptyCertificate(self):
     certFilePath = FilePath(self.mktemp())
     certFilePath.setContent("")
     success, _ignore_reason = verifyTLSCertificate(
         ConfigDict({
             "SSLCertificate": certFilePath.path,
         }))
     self.assertFalse(success)
 def test_missingCertificate(self):
     success, _ignore_reason = verifyTLSCertificate(
         ConfigDict(
             {
                 "SSLCertificate": "missing",
             }
         )
     )
     self.assertFalse(success)
 def test_emptyCertificate(self):
     certFilePath = FilePath(self.mktemp())
     certFilePath.setContent("")
     success, _ignore_reason = verifyTLSCertificate(
         ConfigDict(
             {
                 "SSLCertificate": certFilePath.path,
             }
         )
     )
     self.assertFalse(success)
Exemple #5
0
 def test_bogusCertificate(self):
     certFilePath = FilePath(self.mktemp())
     certFilePath.setContent("bogus")
     keyFilePath = FilePath(self.mktemp())
     keyFilePath.setContent("bogus")
     success, _ignore_reason = verifyTLSCertificate(
         ConfigDict({
             "SSLCertificate": certFilePath.path,
             "SSLPrivateKey": keyFilePath.path,
             "SSLAuthorityChain": "",
             "SSLMethod": "SSLv3_METHOD",
             "SSLCiphers":
             "ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM",
             "SSLKeychainIdentity": "missing",
         }))
     self.assertFalse(success)
 def test_bogusCertificate(self):
     certFilePath = FilePath(self.mktemp())
     certFilePath.setContent("bogus")
     keyFilePath = FilePath(self.mktemp())
     keyFilePath.setContent("bogus")
     success, _ignore_reason = verifyTLSCertificate(
         ConfigDict(
             {
                 "SSLCertificate": certFilePath.path,
                 "SSLPrivateKey": keyFilePath.path,
                 "SSLAuthorityChain": "",
                 "SSLMethod": "SSLv3_METHOD",
                 "SSLCiphers": "ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM",
             }
         )
     )
     self.assertFalse(success)