1
# Copyright (c) 2001-2008 Twisted Matrix Laboratories.
2
# See LICENSE for details.
5
An error to represent bad things happening in Conch.
7
Maintainer: Paul Swartz
10
from twisted.cred.error import UnauthorizedLogin
14
class ConchError(Exception):
15
def __init__(self, value, data = None):
16
Exception.__init__(self, value, data)
22
class NotEnoughAuthentication(Exception):
24
This is thrown if the authentication is valid, but is not enough to
25
successfully verify the user. i.e. don't retry this type of
26
authentication, try another one.
31
class ValidPublicKey(UnauthorizedLogin):
33
Raised by public key checkers when they receive public key credentials
34
that don't contain a signature at all, but are valid in every other way.
35
(e.g. the public key matches one in the user's authorized_keys file).
38
L{SSHUserAuthServer<twisted.conch.ssh.userauth.SSHUserAuthServer>}) which
39
attempts to log in using
40
L{ISSHPrivateKey<twisted.cred.credentials.ISSHPrivateKey>} credentials
41
should be prepared to handle a failure of this type by telling the user to
42
re-authenticate using the same key and to include a signature with the new
45
See U{http://www.ietf.org/rfc/rfc4252.txt} section 7 for more details.
50
class IgnoreAuthentication(Exception):
52
This is thrown to let the UserAuthServer know it doesn't need to handle the
53
authentication anymore.
58
class MissingKeyStoreError(Exception):
60
Raised if an SSHAgentServer starts receiving data without its factory
61
providing a keys dict on which to read/write key data.
66
class UserRejectedKey(Exception):
68
The user interactively rejected a key.
73
class InvalidEntry(Exception):
75
An entry in a known_hosts file could not be interpreted as a valid entry.
80
class HostKeyChanged(Exception):
82
The host key of a remote host has changed.
84
@ivar offendingEntry: The entry which contains the persistent host key that
85
disagrees with the given host key.
87
@type offendingEntry: L{twisted.conch.interfaces.IKnownHostEntry}
89
@ivar path: a reference to the known_hosts file that the offending entry
92
@type path: L{twisted.python.filepath.FilePath}
94
@ivar lineno: The line number of the offending entry in the given path.
98
def __init__(self, offendingEntry, path, lineno):
99
Exception.__init__(self)
100
self.offendingEntry = offendingEntry