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