Exemplo n.º 1
0
 def test_credentials_invalid_signature(self):
     """
     Calling L{SSHPublicKeyChecker.requestAvatarId} with credentials that
     are incorrectly signed fails with L{UnauthorizedLogin}
     """
     self.credentials.signature = (
         Key.fromString(privateDSA_openssh).sign('foo'))
     self.failureResultOf(self.checker.requestAvatarId(self.credentials),
                          UnauthorizedLogin)
Exemplo n.º 2
0
 def test_credentials_invalid_signature(self):
     """
     Calling L{SSHPublicKeyChecker.requestAvatarId} with credentials that
     are incorrectly signed fails with L{UnauthorizedLogin}
     """
     self.credentials.signature = (
         Key.fromString(privateDSA_openssh).sign('foo'))
     self.failureResultOf(self.checker.requestAvatarId(self.credentials),
                          UnauthorizedLogin)
Exemplo n.º 3
0
 def setUp(self):
     self.credentials = SSHPrivateKey(
         'alice', 'ssh-rsa', publicRSA_openssh, 'foo',
          Key.fromString(privateRSA_openssh).sign('foo'))
     self.keydb = _KeyDB(lambda _: [Key.fromString(publicRSA_openssh)])
     self.checker = SSHPublicKeyChecker(self.keydb)
Exemplo n.º 4
0
 def setUp(self):
     self.credentials = SSHPrivateKey(
         'alice', 'ssh-rsa', publicRSA_openssh, 'foo',
         Key.fromString(privateRSA_openssh).sign('foo'))
     self.keydb = _KeyDB(lambda _: [Key.fromString(publicRSA_openssh)])
     self.checker = SSHPublicKeyChecker(self.keydb)