Skip to content

Commit

Permalink
Add intergration test for server disable authentication with client cert
Browse files Browse the repository at this point in the history
  • Loading branch information
phamann committed Apr 18, 2019
1 parent cdd6b79 commit d789a3d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/test-server-disable-authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
'--cacert=root.crt',
'--disable-authentication'])

# connect with client1, confirm that the tunnel is up
# connect with no client cert, confirm that the tunnel is up
pair = SocketPair(TlsClient(None, 'root', 13001), TcpServer(13002))
pair.validate_can_send_from_client(
"hello world", "1: client -> server")
Expand All @@ -38,6 +38,16 @@
pair.validate_closing_client_closes_server(
"1: client closed -> server closed")

# connect with client1 cert, confirm that the tunnel is up
pair2 = SocketPair(
TlsClient('client1', 'root', 13001), TcpServer(13002))
pair2.validate_can_send_from_client(
"hello world", "1: client -> server")
pair2.validate_can_send_from_server(
"hello world", "1: server -> client")
pair2.validate_closing_client_closes_server(
"1: client closed -> server closed")

# connect with client2, confirm that the tunnel isn't up
try:
pair = SocketPair(
Expand Down

0 comments on commit d789a3d

Please sign in to comment.