Revision e712e5b8 test/ganeti.tools.node_daemon_setup_unittest.py
b/test/ganeti.tools.node_daemon_setup_unittest.py | ||
---|---|---|
101 | 101 |
cert_pem = utils.ReadFile(cert_filename) |
102 | 102 |
result = \ |
103 | 103 |
node_daemon_setup._VerifyCertificate(cert_pem, _check_fn=self._Check) |
104 |
self.assertTrue("-----BEGIN PRIVATE KEY-----" in result) |
|
105 |
self.assertTrue("-----BEGIN CERTIFICATE-----" in result) |
|
104 |
|
|
105 |
cert = OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_PEM, result) |
|
106 |
self.assertTrue(cert) |
|
107 |
|
|
108 |
key = OpenSSL.crypto.load_privatekey(OpenSSL.crypto.FILETYPE_PEM, result) |
|
109 |
self.assertTrue(key) |
|
106 | 110 |
|
107 | 111 |
def testMismatchingKey(self): |
108 | 112 |
cert1_path = self._TestDataFilename("cert1.pem") |
Also available in: Unified diff