MCPcopy Create free account
hub / github.com/apache/qpid-proton / test_server_authentication

Method test_server_authentication

python/tests/proton_tests/ssl.py:211–230  ·  view source on GitHub ↗

Simple SSL connection with authentication of the server

(self)

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls 7

_pumpMethod · 0.95
set_credentialsMethod · 0.45
set_trusted_ca_dbMethod · 0.45
openMethod · 0.45
protocol_nameMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected