Example #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)
Example #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)
Example #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)
Example #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)