예제 #1
0
    def step(self, token=None):
        """Perform next step in GSS security exchange"""

        token, complete = step(self._host, token)

        if complete:
            self._complete = True

        if token == b'error':
            raise GSSError(99, 99)
        elif token == b'errtok':
            raise GSSError(99, 99, token)
        else:
            return token
예제 #2
0
    def verify_signature(self, data, sig):
        """Verify a signature for a block of data"""

        # pylint: disable=no-self-use,unused-argument

        if sig == b'fail':
            raise GSSError(99, 99)
예제 #3
0
    def __init__(self, base, name_type=None):
        # pylint: disable=unused-argument

        if 'init_error' in base:
            raise GSSError(99, 99)

        self.host = base[5:]
예제 #4
0
    def __init__(self, base, _name_type=None):
        if 'init_error' in base:
            raise GSSError(99, 99)

        self.host = base[5:]