How to use the sshpubkeys.exceptions.InvalidKeyException function in sshpubkeys

To help you get started, we’ve selected a few sshpubkeys examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ojarva / python-sshpubkeys / sshpubkeys / exceptions.py View on Github external
# pylint:disable=line-too-long,too-many-ancestors
"""Exceptions for sshpubkeys."""


class InvalidKeyException(Exception):
    """Invalid key - something is wrong with the key, and it should not be accepted, as OpenSSH will not work with it."""


class InvalidKeyError(InvalidKeyException):
    """Invalid key - something is wrong with the key, and it should not be accepted, as OpenSSH will not work with it."""


class InvalidKeyLengthException(InvalidKeyError):
    """Invalid key length - either too short or too long.

    See also TooShortKeyException and TooLongKeyException."""


class InvalidKeyLengthError(InvalidKeyError):
    """Invalid key length - either too short or too long.

    See also TooShortKeyException and TooLongKeyException."""


class TooShortKeyException(InvalidKeyLengthError):