Example #1
0
 def test_missingCertificate(self):
     success, _ignore_reason = verifyTLSCertificate(
         ConfigDict({
             "SSLCertificate": "missing",
             "SSLKeychainIdentity": "missing",
         }))
     self.assertFalse(success)
Example #2
0
 def test_emptyCertificate(self):
     certFilePath = FilePath(self.mktemp())
     certFilePath.setContent("")
     success, _ignore_reason = verifyTLSCertificate(
         ConfigDict({
             "SSLCertificate": certFilePath.path,
         }))
     self.assertFalse(success)
Example #3
0
 def test_missingCertificate(self):
     success, _ignore_reason = verifyTLSCertificate(
         ConfigDict(
             {
                 "SSLCertificate": "missing",
             }
         )
     )
     self.assertFalse(success)
Example #4
0
 def test_emptyCertificate(self):
     certFilePath = FilePath(self.mktemp())
     certFilePath.setContent("")
     success, _ignore_reason = verifyTLSCertificate(
         ConfigDict(
             {
                 "SSLCertificate": certFilePath.path,
             }
         )
     )
     self.assertFalse(success)
Example #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)
Example #6
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",
             }
         )
     )
     self.assertFalse(success)