diff options
-rw-r--r-- | paramiko/rsakey.py | 2 | ||||
-rw-r--r-- | tests/test_auth.py | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/paramiko/rsakey.py b/paramiko/rsakey.py index b0c13386..01a1442a 100644 --- a/paramiko/rsakey.py +++ b/paramiko/rsakey.py @@ -68,7 +68,7 @@ class RSAKey(PKey): if isinstance(self.key, rsa.RSAPrivateKey): return self.key.private_numbers().public_numbers else: - return self.key.public_numbers + return self.key.public_numbers() def asbytes(self): m = Message() diff --git a/tests/test_auth.py b/tests/test_auth.py index ec78e3ce..23517790 100644 --- a/tests/test_auth.py +++ b/tests/test_auth.py @@ -83,13 +83,13 @@ class NullServer (ServerInterface): return AUTH_SUCCESSFUL return AUTH_PARTIALLY_SUCCESSFUL return AUTH_FAILED - + def check_auth_interactive(self, username, submethods): if username == 'commie': self.username = username return InteractiveQuery('password', 'Please enter a password.', ('Password', False)) return AUTH_FAILED - + def check_auth_interactive_response(self, responses): if self.username == 'commie': if (len(responses) == 1) and (responses[0] == 'cat'): @@ -111,7 +111,7 @@ class AuthTest (unittest.TestCase): self.ts.close() self.socks.close() self.sockc.close() - + def start_server(self): host_key = RSAKey.from_private_key_file(test_path('test_rsa.key')) self.public_host_key = RSAKey(data=host_key.asbytes()) @@ -120,7 +120,7 @@ class AuthTest (unittest.TestCase): self.server = NullServer() self.assertTrue(not self.event.is_set()) self.ts.start_server(self.event, self.server) - + def verify_finished(self): self.event.wait(1.0) self.assertTrue(self.event.is_set()) @@ -156,7 +156,7 @@ class AuthTest (unittest.TestCase): self.assertTrue(issubclass(etype, AuthenticationException)) self.tc.auth_password(username='slowdive', password='pygmalion') self.verify_finished() - + def test_3_multipart_auth(self): """ verify that multipart auth works. @@ -187,7 +187,7 @@ class AuthTest (unittest.TestCase): self.assertEqual(self.got_prompts, [('Password', False)]) self.assertEqual([], remain) self.verify_finished() - + def test_5_interactive_auth_fallback(self): """ verify that a password auth attempt will fallback to "interactive" |