def testRejectAuthenticated(self): self.config["nuauth_reject_after_timeout"] = 0 self.config["nuauth_reject_authenticated_drop"] = 1 self.nuauth = Nuauth(self.config) user = self.users[0] client = user.createClientWithCerts() testPortFailure(self, self.iptables, client, VALID_PORT, ECONNREFUSED) client.stop()
def testDrop(self): self.config["nuauth_reject_after_timeout"] = "0" self.config["nuauth_reject_authenticated_drop"] = "0" self.nuauth = Nuauth(self.config) user = self.users[0] client = user.createClientWithCerts() testPortFailure(self, self.iptables, client, VALID_PORT, ETIMEDOUT) client.stop()
def testRejectTimedout(self): self.config["nuauth_reject_after_timeout"] = "1" self.config["nuauth_reject_authenticated_drop"] = "0" self.nuauth = Nuauth(self.config) testPortFailure(self, self.iptables, None, VALID_PORT, ECONNREFUSED)