(self)
| 6 | |
| 7 | class TestCryptConnection: |
| 8 | def testSslCert(self): |
| 9 | # Remove old certs |
| 10 | if os.path.isfile("%s/cert-rsa.pem" % config.data_dir): |
| 11 | os.unlink("%s/cert-rsa.pem" % config.data_dir) |
| 12 | if os.path.isfile("%s/key-rsa.pem" % config.data_dir): |
| 13 | os.unlink("%s/key-rsa.pem" % config.data_dir) |
| 14 | |
| 15 | # Generate certs |
| 16 | CryptConnection.manager.loadCerts() |
| 17 | |
| 18 | assert "tls-rsa" in CryptConnection.manager.crypt_supported |
| 19 | assert CryptConnection.manager.selectCrypt(["tls-rsa", "unknown"]) == "tls-rsa" # It should choose the known crypt |
| 20 | |
| 21 | # Check openssl cert generation |
| 22 | assert os.path.isfile("%s/cert-rsa.pem" % config.data_dir) |
| 23 | assert os.path.isfile("%s/key-rsa.pem" % config.data_dir) |
nothing calls this directly
no test coverage detected