Simple SSL connection with authentication of the server
(self)
| 209 | self._pump(client, server) |
| 210 | |
| 211 | def test_server_authentication(self): |
| 212 | """ Simple SSL connection with authentication of the server |
| 213 | """ |
| 214 | self.server_domain.set_credentials(self._testpath("server-certificate.pem"), |
| 215 | self._testpath("server-private-key.pem"), |
| 216 | "server-password") |
| 217 | |
| 218 | self.client_domain.set_trusted_ca_db(self._testpath("ca-certificate.pem")) |
| 219 | self.client_domain.set_peer_authentication(SSLDomain.VERIFY_PEER) |
| 220 | |
| 221 | server = SslTest.SslTestConnection(self.server_domain, mode=Transport.SERVER) |
| 222 | client = SslTest.SslTestConnection(self.client_domain) |
| 223 | |
| 224 | client.connection.open() |
| 225 | server.connection.open() |
| 226 | self._pump(client, server) |
| 227 | assert client.ssl.protocol_name() is not None |
| 228 | client.connection.close() |
| 229 | server.connection.close() |
| 230 | self._pump(client, server) |
| 231 | |
| 232 | def test_intermediate_ca(self): |
| 233 | """ Ensure an intermediate/subordinate certificate can be used as a CA for validation. |
nothing calls this directly
no test coverage detected